LLBLGen Multi Server in SQLServer

Posts   
 
    
juliom
User
Posts: 17
Joined: 13-Jun-2005
# Posted on: 20-Jan-2006 17:28:20   

Hello there!!!

For a project we are working on access to two (at least) different servers is required. We are using SQLServer and we have two different instalations (many reasons for that, performance, no single point of failure, security, among others). The thing is... LLBLGen with SQLServer is multi catalog... How would you recommend to proceed if multi server funtionality is required???

I was thinking of having two different projects one for each server but then how do I deal with the config file


<appSettings>
<add key="Main.ConnectionString" value="data source=Server1;initial catalog=DB1;User ID=XXXX;Password=YYYY;Persist Security Info=True;packet size=4096"/>
</appSettings>

I don't think something like this


<appSettings>
<add key="Main.ConnectionString" value="data source=Server1;initial catalog=DB1;User ID=XXXX;Password=YYYY;Persist Security Info=True;packet size=4096"/>
<add key="Main.ConnectionString" value="data source=Server2;initial catalog=DB2;User ID=XXXX;Password=YYYY;Persist Security Info=True;packet size=4096"/>
</appSettings>

would work... would it???

The Adapter can be instantiated with the connection string as a parameter, is that the way to go???

Thanks in advance for your help...

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 21-Jan-2006 02:23:15   

If they are both identical database schema's then I would use the same project and change the string using adapter. If you want to use two projects you can define what the key should be in the config file under Project->Properties->Output Settings->ConnectionStringKeyName.