Forcing LLBLGen to use the catalog specified in the connection string

Posts   
 
    
Posts: 497
Joined: 08-Apr-2004
# Posted on: 16-Jul-2007 09:58:31   

Hi all

Can I tell LLBLGen to use the catalog name thats specified in the connection string?

We always generate against a "test" database, so we always want to tell the code to use a different catalog name in the main code. Because i've been using LLBLGen for a while, we're using the "old skool" way to do this:

<add key="Main.ConnectionString" value="application name=xxx;data source=XXX;initial catalog=Demo;User ID=xxx;Password=yyy;persist security info=False;packet size=4096"/>

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

So, whenever I want to point to a different database i need to change the conn string and hte CatalogNameToUse.

What I want to do is to tell LLBLGen to use the catalog name I specify in my connection string, that way I don't need to worry about it.

Can I do this? If not, can I request it for the next release simple_smile

Posts: 497
Joined: 08-Apr-2004
# Posted on: 16-Jul-2007 10:03:21   

As soon as I wrote this, I noticed this in the documentation:

"You can also specify an empty string. In that case, the DQE will not specify a catalog name in the generated SQL elements, which will make the SQL target the catalog specified in the connection string. "

Which does exactly what I want !