i want to save dataset from table (bible) to another table (tt) in access 2003 database
this is the code i have
vb Code:
Private Sub Option1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Option1ToolStripMenuItem.Click Dim sQuery As String = "SELECT Bible.BookNum, Bible.ChapterNum, Bible.VerseNum FROM BibleBookNames INNER JOIN Bible ON BibleBookNames.BookNum = Bible.BookNum WHERE (((BibleBookNames.Book)=""" & DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells(0).Value.ToString & """) AND ((Bible.ChapterNum)= " & ComboBox2.Text & ") AND ((Bible.VerseNum)=" & DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells(1).Value.ToString & "));" Dim SQLQuery As New OleDbDataAdapter(sQuery, CON) Dim dsResult As New DataSet SQLQuery.Fill(dsResult, "tt") Dim sCollection As String = "Select * from tt;" Dim daCollection As New OleDbDataAdapter(sCollection, CON) Dim objCommandBuilder As New OleDbCommandBuilder(daCollection) daCollection.Update(dsResult, "tt") End Sub
but nothing happen or being saved to the other table which is tt




Reply With Quote