Code looking for DB name

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 20-Dec-2005 15:26:12   

Hi,

When running against a live database, I have updated the web.config connection string but an exception is being thrown...

An exception was caught during the execution of a retrieval query: Invalid object name 'Emda_Extranet.dbo.tbl_FileTypes'.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.

'Emda_Extranet' is the name of the local database so I don't understand why the code is looking for it. The live database has a different name.

Cheers, I.

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 21-Dec-2005 02:25:58   

The objects have the catalog that was used to generate the code in them. In order to change this you must use name overwriting. Here is a short another thread that gives a solution and some background on the behavior. http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3397&HighLight=1