Change Database name

Posts   
 
    
astrnad
User
Posts: 30
Joined: 23-Jul-2007
# Posted on: 13-Nov-2007 10:55:55   

Version: LLBL Gen 2.0 Final SQL Server 2005

Hello,

I have spent some hours on debugging why the generated access layer works on one machine and tells me that some fields are invalid on another. Basically i have my development machine with a development version of the db, name it "database" (name changed). On the production machine there also is a database with the name "database", but the schema adheres to the released version, which is naturally older than the development version. So i created a "database_dev" on the production machine to test the new version. Now the problems arose: when i set the connection string to the production system with the catalog name of "database_dev", the application fails with errors about invalid fields, but when i connect to my local database, it works. Is the database name hardcoded somewhere in the DAL, oblivious of what is set as initial catalog in the connection string?

Best regards, Alexander Strnad

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Nov-2007 11:12:57   

Is the database name hardcoded somewhere in the DAL, oblivious of what is set as initial catalog in the connection string?

Yes it is hardcoded by design to enable you to use more than one catalog/database in the same project.

To change the hardcoded values, please check the Catalog name overwriting in the LLBLGen Pro manual "Using the generated code -> Application configuration through .config files".

astrnad
User
Posts: 30
Joined: 23-Jul-2007
# Posted on: 13-Nov-2007 11:58:02   

Hello,

Walaa wrote:

Is the database name hardcoded somewhere in the DAL, oblivious of what is set as initial catalog in the connection string?

Yes it is hardcoded by design to enable you to use more than one catalog/database in the same project.

To change the hardcoded values, please check the Catalog name overwriting in the LLBLGen Pro manual "Using the generated code -> Application configuration through .config files".

Especially leaving the value field of the renaming tag empty did the trick. Thanks!

Best regards, Alexander Strnad