LLBLGen is still saving data to the development database

Posts   
 
    
cjmos
User
Posts: 15
Joined: 04-May-2007
# Posted on: 04-May-2007 11:48:23   

Hi all,

I have recently released a project from our development server to our live server. The project uses a self-servicing LLBLGen DAL. To try and make sure I'm connecting to the live database rather than the dev db, I set ipa.dal.HelperClasses.DbUtils.ActualConnectionString = "Our live conn string" On session_start in global.asax. This seems to work well for most of the application but if ever we try and save an entity, it still goes to our development DB. I've also set the app.config to store our live db conn string. It's just weird, even if I step through the code, the dal seems to retrieve the correct conn string. DetermineConnectionToUse return a connection with the correct conn string but the data still gets saved to the wrong place.

Am i missing something?

Best regards,

Chris

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 04-May-2007 15:54:16   

The connection string only decides the database server and credentials.

But the catalog name (database name) is hardcoded in the generated code. And to change that you have to use catalog names overwriting. Please refer to the manual: Using the generated code -> Application configuration through .config files

Skeeterbug
User
Posts: 165
Joined: 21-May-2004
# Posted on: 04-May-2007 18:52:19   

In your appSettings section:

<add key="CatalogNameUsageSetting" value="1"/> <add key="CatalogNameToUse" value="nameHere"/>