CatalogNameOverwrit

Posts   
 
    
Noer
User
Posts: 33
Joined: 04-Jan-2007
# Posted on: 22-May-2007 10:49:51   

Hi,

Is it posible to set sqlServerCatalogNameOverwrites in the code instead of in .config?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-May-2007 10:56:12   

You should then use the Adapter model and pass catalogNameToUse and catalogNameUsageSetting in the constructor of the DataAccessAdapter class.

CatalogNameUsageSetting = "1" (forceName) CatalogNameToUse = the catalog name to use for each database call.

Noer
User
Posts: 33
Joined: 04-Jan-2007
# Posted on: 22-May-2007 11:02:46   

Ok, but it's not possible with SelfServicing model?

My problem is that I have made a Windows User Control that is hosted in a web-page and can't use a app.config. I have a prod and a dev DB (DbName and DbName_Dev) but I cant connect to the DbName_Dev DB because I have to override catalouge name.

Aurelien avatar
Aurelien
Support Team
Posts: 162
Joined: 28-Jun-2006
# Posted on: 22-May-2007 14:53:13   

Hi,

As I far know, it is not possible with SelfServicing.