setting the database name in the config file only.

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 06-May-2008 18:05:26   

asp.net 2.0 llblgenpro 2.5 adapterTemplate

Hiya,

I see that in the generated code, the name of the database is hard-coded, eg, in the

"RetrievalProcedures.cs file":

DataTable toReturn = new DataTable("Helpdiagramdefinition"); bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[HARD_CODED_DATABASE_NAME].[dbo].[sp_helpdiagramdefinition]", parameters, toReturn);

I want the database name to come from the webConfig.I don't want it hard-coded in the generated code.

Is there asetting in the templates that will allow me to do this?

Many thanks,

yogi

arschr
User
Posts: 893
Joined: 14-Dec-2003
# Posted on: 06-May-2008 23:41:33   

If you search the forums you'll find an answer. this has been asked and answered many many times

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 07-May-2008 10:10:31   

Use Catalog name overwriting. Please consult the manual, section: Using the generated code -> Application configuration through .config files