Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Catalog name overwriting
 

Pages: 1
Bugs & Issues
Catalog name overwriting
Page:1/1 

  Print all messages in this thread  
Poster Message
SpykLee
User



Location:
Zaandam, The Netherlands
Joined on:
06-Jul-2005 14:42:58
Posted:
8 posts
# Posted on: 27-Aug-2007 23:38:19.  
Hi,

I'm using version 2.5 August second edition and I'm trying the Catalog name overwriting as described in the help.

Seems that the following code in the app.config is not working properly.

Code:
<?xml version="1.0"?>
<configuration>

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

    <sqlServerCatalogNameOverwrites>
        <add key="old_db" value="new_db" />
    </sqlServerCatalogNameOverwrites>

    <appSettings>
        <add key="Main.ConnectionString" value="data source=localhost\sqlexpress;initial catalog=old_db;integrated security=SSPI;persist security info=False;packet size=4096"/>
    </appSettings>

</configuration>



Code is generated with old_db and after the code generation I renamed the db to new_db
connecting with integrated security, user is dbo.

How should I setup the config file to let it work?

Cheers!

Eric
  Top
JimHugh
User



Location:
Davis, CA
Joined on:
16-Nov-2005 14:32:25
Posted:
191 posts
# Posted on: 28-Aug-2007 00:15:21.  
One quick suggestion:

Take initial catalog=old_db; out of the Main.ConnectionString value.

Then it will should use the inital database connection for the current user (configured through SQL Mangement Studio.

BTW, just picking nits, but dbo is the schema, not user.

Yyou know this only works for non web apps, right? Web apps use web.config.

And app.config gets copied to debug/release folder as yourappname.config

My App.config has:
Code:

<add key="Main.ConnectionString" value="Server=SERVER01;Trusted_Connection=true"/>


Code:

<appSettings>
        <add key="Main.ConnectionString" value="data source=localhost\sqlexpress;integrated security=SSPI;persist security info=False;packet size=4096"/>
    </appSettings>


Just trying to cover a lot of the frequent issues.


Jim Hughes  Top
SpykLee
User



Location:
Zaandam, The Netherlands
Joined on:
06-Jul-2005 14:42:58
Posted:
8 posts
# Posted on: 30-Aug-2007 14:12:54.  
Yep! That worked Regular Smiley

Thanks!
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.