For Each row As DataRow In dt.Rows Dim con2 As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\admin\Desktop\Clean OCR DB\KM.mdb;Persist Security Info=False;Jet OLEDB:Database Password= Pa$$w0rd!238;") Dim cmd As OleDbCommand = New OleDbCommand("insert into Department([Department],[DeptID]) values(" + dt.Rows(0)("Department").ToString + "," + dt.Rows(0)("DeptID").ToString + ")", con2) con2.Open() cmd.ExecuteNonQuery() con2.Close() cmd.Dispose() Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)