No need to do that... Why take the overhead of moving the data from the database to the client and back to the database....
This can all be done in 1 SQL statement and happen directly on the database
Insert into TableName (FieldName1,FieldName2,....) Select Field1,Field2,.... From table
Code:INSERT INTO whaterTableName (BookNummChapterNum,VerseNum) 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 & "))




Reply With Quote