Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How to make sure BindingSource.DataSource takes connections information from App.Config file and not the hardcoded values?

$
0
0

HI,

I have a Winform where I have connection.config file where i get my database connection.

I also have forms where i have dataGridView and that is bound to a DataSet that are in .XSD file.  I used that while i was creating an application. Now when i publish to server for live, it still displays data from hardcoded values of DataSet rather than taking it from App.config ( connection.config) file. How do i make sure all of my connections comes from that one eg. connection string that are in connection.config file?

e.g.  this.tbl_StatusTableAdapter.Fill(this.MyDataSet.Tbl_Status);

Above line of code does not connect to App.config files connection!

 this.tbl_TableAdapter.Update(this.DBDataSet);
How do i convert above statement that link to App.COnfig connection?

Please help!


JRS



Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>