Question Data adapter XSD - question on setting connection string

deepay

New member
Joined
Nov 9, 2010
Messages
2
Programming Experience
3-5
Hi All,

I have an Vb.NET application that uses data adapters in a XSD file to update the database. Every table in the XSD file has its own select, insert, delete and update commands. The application does not update one database, but a set of mdb's depending on the file selected by the user. Every file is an mdb on its own. When the user selects a file during runtime, the adapter's connection string is also changed as below:
codeAdapter.Connection.ConnectionString = connString (connstring is passed in)

For example when a detail has to be updated in the code table, then the adpater's update command is set as below:

codeAdapter.Adapter.UpdateCommand.CommandText = updateQuery
codeAdapter.Update()

Sometimes, the update command's connection string still points to a previous file the user was working on, though the adapter's connection string points to the current file. And this problem happens only some times - which does not make any sense. Setting the adapter's connection string should set all command's (belonging to that adapter) to point to the same connection string - am I right or wrong? Please advise. Thanks for your time and patience.
 
Back
Top