Hardcoded sourceCatalogName

Posts   
 
    
Jackk100
User
Posts: 48
Joined: 11-Jan-2005
# Posted on: 07-Jun-2005 18:11:19   

Hi,

Using adapter, it looks like in PersistenceInfoFactory.cs the sourceCatalogName is hardcoded in the new FieldPersistenceInfo() method calls. I would like to be able to change the name of the db from OUTSIDE the compiled code. IE, I manage the db and want to be able to give my DB any name I want (for testing and remote customer installs where they control the db name), and change the source catalog name value via app.config, or even better, via a web.config of a web project that uses my generated code.

Is there maybe a way to edit the generator so that it puts a var in where the hardcoded sourceCatalogName value is?

Suggestions?

Thanks, Jack

jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 07-Jun-2005 20:28:20   

Jackk100 wrote:

Hi,

Using adapter, it looks like in PersistenceInfoFactory.cs the sourceCatalogName is hardcoded in the new FieldPersistenceInfo() method calls. I would like to be able to change the name of the db from OUTSIDE the compiled code. IE, I manage the db and want to be able to give my DB any name I want (for testing and remote customer installs where they control the db name), and change the source catalog name value via app.config, or even better, via a web.config of a web project that uses my generated code.

Is there maybe a way to edit the generator so that it puts a var in where the hardcoded sourceCatalogName value is?

Suggestions?

Thanks, Jack

See the documenation at: Using the generated code->Application configuration through .config files. LLBLGen supports overriding the catalog name through app.config or web.config.

Jeff...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 07-Jun-2005 20:35:09   

Thanks Jeff simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Jackk100
User
Posts: 48
Joined: 11-Jan-2005
# Posted on: 07-Jun-2005 20:54:33   

Hmm, can't seem to find it in the help version 1.0.2004.1 that I have, but I see it in the 1.0.2004.2. Do I have to upgrade?

  • Jack
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 07-Jun-2005 21:08:46   

Jackk100 wrote:

Hmm, can't seem to find it in the help version 1.0.2004.1 that I have, but I see it in the 1.0.2004.2. Do I have to upgrade?

  • Jack

In 1.0.2004.1 it's also available, though not as rich as in 1.0.2004.2. Please check the Using the generated code -> Adapter -> DataAccessAdapter functionality section, and then the sqlserver specific paragraph.

Frans Bouma | Lead developer LLBLGen Pro