Changing databases

J

Jim

In C# Express 2008 I have a form filled with data-bound textboxes that were
made by dragging a table to the form from MyDataSet. This works very nicely.

I also have an SQL connection named MyComm to an access database with the
identical schema to the data-source that was used to place the textboxes on
the form. My question is how do I change the databases ? I have tried
researching this question in C# help, MSDN and Google but with no success.
Any suggestions are welcomed, especially an article or sample code.
Thanks,
Jim
 
V

vanderghast

it is generally trivial, if you use a connection, supply the appropriate
string.

If you use automatically generated code, that may be harder to get the
property. With Microsoft Data Set Generator, .xsd, you can change the Table
Adapter Connection.ConnectionString; with LINQ, use the appropriate
database context overloaded constructor rather than the default one.

Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top