Database Synch- useing MS Sqlserver

Posts   
 
    
Posts: 24
Joined: 26-May-2011
# Posted on: 26-May-2011 14:31:26   

My requriment is work ofline with local Sql Server database, and at the end of date synch with Server online. In Single project can we handle two different Sql server connection.

Thanks in advance

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 26-May-2011 19:03:57   

Yes, easily, but you do need to use the Adapter model rather than self servicing. However what you are describing sounds more like a standard SQL server replication model, where you make updates to your local database, and they are synched to another SQL server using SQL replication facilities - rather than something you need to handle yourself.

Matt

Posts: 24
Joined: 26-May-2011
# Posted on: 27-May-2011 12:24:16   

Thanks for your gaidance. I used to with Self service model, can you describe basic difference between Adapter model and Self service model.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 27-May-2011 13:17:08   

The connectionString can be changed at runtime in code. So provided that both servers have the same schema, this should work smoothly.

The connectionString is static (global) variable, on the contrary in the Adapter it's not, it's a parameter passed to the DataAccessAdapter Ctor, and thus can be changed per call. This means you can have code targeting each server running simultaneously without affecting each other.

This might not make a big difference to you, if the Synching is done at off-times, i.e. no transactions are taking place to the local server. So if you are using selfServicing, you gonna switch to the remote server when synching and when finished switch back to the local one.

Posts: 24
Joined: 26-May-2011
# Posted on: 30-May-2011 13:47:16   

Thanks for co-opration

I understand that you suggest using Adopter model to get this approach. I get conclusion is "I cannot use Self servicing model" for this approach.