Database switching in Selfservice generated code

Posts   
 
    
Saswat
User
Posts: 12
Joined: 08-Jan-2014
# Posted on: 26-Jun-2014 07:35:22   

Hi , I have a self service generated code from LLBL gen. Here it is using a single connection string. No where I found where to change or switch the connection string. Suppose I am having more than one database in MSSQL server. I want to switch the database at run time. How to achieve this in self service generated code ? Please help me.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 26-Jun-2014 09:19:14   

As stated in the documentation, you can't do that with SelfServicing, you need adapter.

http://www.llblgen.com/documentation/4.1/LLBLGen%20Pro%20RTF/hh_goto.htm#Concepts/concepts_templatesets.htm

Frans Bouma | Lead developer LLBLGen Pro
JayBee
User
Posts: 275
Joined: 28-Dec-2006
# Posted on: 08-Aug-2014 20:52:55   

A long time ago I also asked a question like this.....

You cannot do this at runtime, but you can do a catalog overwrite in your config file.

There is also no problem in using multiple databases when programming in SelfServicing mode. The only problem is that you cannot switch between databases at runtime. I.e. in the middle of a program.