Switch Database dynamically between read and write operation

vinitfichadia

Member
Joined
Jun 26, 2008
Messages
11
Programming Experience
1-3
Hi all,

we are having windows application developed under vb.net, we have database distributed between two offices one in pune and other in mumbai.

i want a way in which mumbai users can read data from mumbai and perform write operation in pune office. so i need to switch database (or connection string) between mumbai and pune.

what would be the way to accomplish this

help would be highly appreciated.

Thanks

Vinit Fichadia
 
in the dataset generator, pick your tableadapter and look at the properties. set the ConnectionModifier property to PUBLIC

You can now say:

myTableAdapter.Connection.Connectionstring = "<whatever>"
 
dont forget that after you download a row it will have a status of Unchanged. You will need to change its status with SetAdded or SetModified if you want your tableadapter to see it as a row that must be uplaoded to the new database
 

Latest posts

Back
Top