Connection String not getting updated.

Posts   
 
    
svuddhi
User
Posts: 16
Joined: 06-Dec-2006
# Posted on: 20-Dec-2006 12:39:13   

I am using the adaptor senario and I have a Main.ConnectionString connected to 'DB1' database for my development environment.

I changed the database name to 'DB2' in web.config file. I have not recompiled my LLBLGenPro generated code since both the 'DB1' and 'DB2' are having the same schema. However I noticed that while executing, LLBLGenPro is still connecting to the 'DB1' database and not to the updated 'DB2' which it is supposed to do.

Please let me know any other changes that I need to do.

Thanks, Sitaram

DvK
User
Posts: 323
Joined: 22-Mar-2006
# Posted on: 20-Dec-2006 13:29:51   

Hi,

Did you set the sqlServerCatalogNameOverwrites in .config file ?

kind regards, Danny

svuddhi
User
Posts: 16
Joined: 06-Dec-2006
# Posted on: 20-Dec-2006 13:32:14   

DvK wrote:

Did you set the sqlServerCatalogNameOverwrites in .config file ?

No, I have not used any of that.

DvK
User
Posts: 323
Joined: 22-Mar-2006
# Posted on: 20-Dec-2006 14:13:12   

If you're using Adapter, then you should set this in order to keep things working when the catalogname changes.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Dec-2006 14:56:59   

Please check the section Catalog name overwriting (SqlServer only) in the LLBLGen Pro docs "Using the generated code -> Application configuration through .config files"

svuddhi
User
Posts: 16
Joined: 06-Dec-2006
# Posted on: 20-Dec-2006 15:23:08   

I just implemented

<configSections>
    <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" />
  </configSections>

  <sqlServerCatalogNameOverwrites>
    <add key="DBDevelopment" value="DBTest" />
  </sqlServerCatalogNameOverwrites>

And its working fine. Thankyou Walla.

Regards