set default schema on connection string

  • Thread starter Thread starter Nalaka
  • Start date Start date
N

Nalaka

Hi,
We have a aps.net 2.0 web application and sqlserver 2005.
We keep the connection string in the web.config file.

We need to set the for the web application...
so we do not have to hard code the default schema in every call.

Is it possible to set default schema in the connection string?


Thanks
Nalaka
 
Hi,

can't you set default schema for the SQL Server user which you use for the
ASP.NET application?

Sample from Books Online

USE AdventureWorks;
ALTER USER Abolrous WITH DEFAULT_SCHEMA = Purchasing;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top