Problem when publishing my project

Posts   
 
    
daz_oldham avatar
daz_oldham
User
Posts: 62
Joined: 20-Jul-2007
# Posted on: 16-Aug-2007 13:36:05   

Hi

I am using LLBL to create a CMS application, and it will be used for more than one customer. So, on my local dev box my database is called 'rsenergy_master' and on the remote server the database will be called (e.g.) customer_database. Great.

However, when I publish my solution I get an error saying:

Invalid object name 'rsenergy_master.dbo.Page'

So LLBL is remembering the name of the database when it is referencing objects. Can I get it to just access dbo.Page or even better, just Page - obviously I need this to be flexible so that I can just change the web.config for the site and have it running. I don't want to have to re-publish a DAL for every project that I do.

Obviously this is a big sticking point for me so any help would be most appreciated.

Darren

P.S. I am using 2.0.0.0 Final and Self Servicing and the General preset.

arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 16-Aug-2007 14:13:39   

Look in the help. I don't use self servicing but there is a way for you to specify (I think) in the config file the "runtime" database you want to use.

daz_oldham avatar
daz_oldham
User
Posts: 62
Joined: 20-Jul-2007
# Posted on: 16-Aug-2007 14:53:00   

Yep, got it in the end - thanks simple_smile


<configSections>
<section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueFileSectionHan
dler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>

and...

<sqlServerCatalogNameOverwrites>
<add key="NorthwindTest1" value="Northwind1" />
<add key="NorthwindTest2" value="Northwind2" />
</sqlServerCatalogNameOverwrites>

Page 366 of the manual.

Darren