Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the datasource of a dataset?

I'm currently working on a Windows form application using C# in visual studio 2010. I have set up a dataset using the datasource wizard to connect to a SQL CE file. Most of the controls in my application are now data-bound to this dataset. But now I want to change the datasource from SQL CE to SQL Express. All of the tables in the SQL Express database are exactly the same as the ones in the SQL CE file.

So what would be the easiest way for me to change the datasource of my dataset to connect to the SQL Express server instead?

like image 535
Joeri Avatar asked Dec 03 '25 07:12

Joeri


1 Answers

If you used the wizard to create a strongly typed DataSet (.xsd), the connection string should reside either in the config or settings file. Assuming you find it in one of these files, just change it to point at your SQLEXPRESS instance.

like image 73
James Johnson Avatar answered Dec 05 '25 23:12

James Johnson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!