Hello everyone,
I'm working on a VB application in VS 2005. The application was originally built in 2003 (1.1) but I'm starting afresh - I did not want to migrate / upgrade.
The application is used for 3 sites, and each site has it's own backend SQL database (all on the same central server) and all databases are set up exactly the same - it's set this way to split the data, as certain lookups and tables are site specific.
On the original application, I have 3 radioboxes - Site1, Site2, Site3 appear on a form that is first loaded. Only one of these checkboxes can be checked, and when one is, a global variable is set to true, and another two to false -
i.e
If me.rbSite1.checked = true then
varSite1 = true
varSite2 = false
varSite3 = false
elseif me.rbSite2.checked = true then
varSite1 = false
varSite2 = true
varSite3 = falise
elseif me.rbSite3.checked = true then
....you get the point
Then on every form that had dataAdapters, I would create a connection for each of the 3 databases, and at form_load;
if varSite1 = true then
me.dataAdapter1.selectcommand.connection = me.conSite1
me.dataAdapter1.updatecommand.connection = me.conSite1
elseif varSite2 = true then
me.dataAdapter1.selectcommand.connection = me.conSite2
me.dataAdapter1.selectcommand.connection = me.conSite2
Now, working in 2005, I see that data access has changed.
On each "data access" form I am using Typed Datasets, BindingAdapters and dataTables.
I have added the connections I require to My Project Settings tab.
How can I set the correct SQL connection on each form
Regards,