Generated SQL using wrong database?

Posts   
 
    
jovball
User
Posts: 435
Joined: 23-Jan-2005
# Posted on: 28-Sep-2005 13:42:22   

I re-named one of my databases in a move from the development server to the testing server. I thought that all I would need to do for LLBLGen was to change the database name in the web.config file. However, the generated SQL is still refering to the original database name. Is this correct behavior?

I'm using the August run-times.

Joel Reinford

MacDennis avatar
MacDennis
User
Posts: 50
Joined: 03-May-2005
# Posted on: 28-Sep-2005 13:53:06   

I assume you are using the adapter scenario?

From the manual: "For generated code targeting SqlServer (7 or 2000), it can sometimes be necessary to use the generated code with a catalog with a different name as the catalog the project was created with. As LLBLGen Pro generates the catalog name into the code (except in the situation of SelfServicing with just 1 catalog), it might be necessary to specify a way to rename the catalog name in the generated code at runtime with a given name. LLBLGen Pro supports multiple catalogs per project, so you can specify more than one rename definition."

See: Using the generated code > Application configuration through .config files

In short, you need to overwrite the development catalog name with the test catalog name.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 28-Sep-2005 16:09:20   

The fastest resolution is to re-generate the code again to reference the new database name.