Three one questions about releatie in MySQL with Visual Basic 2008.
How can i use Mydatapter1 over again and over agian (see code)?
So that i can fill three datasets
I want to fill three datasets with tree different tables and use them in my program
myCommand1.CommandText = "select * from table1"
myCommand1.Connection = myConn
myAdapter1.SelectCommand = myCommand1
myAdapter1.Fill(MyDataset1, "table1")
MyDataTable1 = MyDataset1.Tables("table1")
DataGridView1.DataSource = MyDataTable1
myCommand1.CommandText = "select * from table2"
myCommand1.Connection = myConn
myAdapter1.SelectCommand = myCommand1
myAdapter1.Fill(MyDataset2, "table2")
MyDataTable2 = MyDataset2.Tables("table2")
DataGridView2.DataSource = MyDataTable2
myCommand1.CommandText = "select * from table3"
myCommand1.Connection = myConn
myAdapter1.SelectCommand = myCommand1
myAdapter1.Fill(MyDataset3, "table3")
MyDataTable3 = MyDataset3.Tables("table3")
DataGridView3.DataSource = MyDataTable3