Hey all,
I got a DataSet with 8 DataTables inside..... Filled the DataSet with the following code:
It seems to work fine....... this is the right way to do things, right?Code:Dim conn As New MySqlConnection Dim ECNDA As MySqlDataAdapter Dim tablenames() As String = {"BopOptions", "BomRouting", "ProgramChanges", "StockedParts", "JigTools", "Status", "ChangeCategories", "Originators"} For i As Integer = 0 To tablenames.GetUpperBound(0) Dim sql As String = "Select " & tablenames(i) & ".* From " & tablenames(i) If ConfigurationSettings.AppSettings("CompLocation") = "1" Then conn.ConnectionString = connStringLocal End If If ConfigurationSettings.AppSettings("CompLocation") = "2" Then conn.ConnectionString = connStringForeign End If ECNDA = New MySqlDataAdapter(sql, conn) Dim myTable As New DataTable(tablenames(i)) ECNDA.Fill(myTable) COMBOSDS.Tables.Add(myTable) conn.Close() Next
How can I insert the changes I have done to one particular Table into the DataBase?
I searched around for an answer, but only got examples using one table in the DataSet.
Thanks




Reply With Quote