Getting Errors while changing the name of the database in web.config in the production server

Posts   
 
    
sbalaji123
User
Posts: 26
Joined: 13-Oct-2006
# Posted on: 29-Nov-2006 09:06:08   

Hi, I am using LLBLGENPRO 2.0 and my application environment is VStudio2005,ASP.NET 2.0 & SQL Server 2005.

I configured the LLBL2.0 with the development database(DEVDB-X) and generated the dll.Its working. Currently we setup the application in the production server.In the production server the name of the database(Production-x) is different.

I added the following attribute in web.config.

<!-- Connection string used by LLBpro classes -->

<add key="Main.ConnectionString" value="data source=xxxx;initial catalog=Production-x;User ID=sa;Password=xxxxx;persist security info=False;packet size=4096"/>

Also dal.dll.xml (App.config) we changed as <?xml version="1.0"?> <configuration> <appSettings> <add key="Main.ConnectionString" value="data source=xxxx;initial catalog=Production-x;User ID=sa;Password=xxxxx;persist security info=False;packet size=4096"/> </appSettings> </configuration>

I put the dal.dll in my bin folder.

But the dal.dll refers the database DEVDB-X only. Is there any problem in my configuration?

How should i go about this? Please give the solution as soos as possible since we work in the production database..

Thanks in advance, Balaji

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 29-Nov-2006 09:54:26   

PLease read the section in migrating your code: Selfservicing:

All persistence info now contains the catalog name as it is known in the project (if applicable, like with SqlServer). This is a change from v1.0.200x.y where the catalog name was only generated into the persistence info when 2 or more catalogs were in the project. Because the catalog name is in the persistence info, you can't simply switch catalogs by setting a connection string, if you need to connect to a different catalog at runtime then the one you used to create the project. To be able to do so, you need catalog name overwriting through the config file. Please see Generated code - Application configuration through .config files for more details on this.

Frans Bouma | Lead developer LLBLGen Pro