I had made a simple app before in which there were two text fields and the BindingSource component was used to fill those fields with data on form load from ms sql server and eventually bind those fields with sql database.
but now what i want is that the user tells the sql file name on run time, and then on next form load the data in the fields should get bind with the sql databse file defined by user.
how to do this???? i thought of so many things... googled many queries but no use.
previously this was the code:
where i used these controls:
BindingSource
DataSet
TableAdapter
but now what i want is that the user tells the sql file name on run time, and then on next form load the data in the fields should get bind with the sql databse file defined by user.
how to do this???? i thought of so many things... googled many queries but no use.
previously this was the code:
VB.NET:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'FormdataDataSet.table_form' table. You can move, or remove it, as needed.
Me.Table_formTableAdapter.Fill(Me.FormdataDataSet.table_form)
where i used these controls:
BindingSource
DataSet
TableAdapter