I have one table, Checkinout in Ms Access, and I want to import all the data of that table to my SQL Server database Checkinout table, using VB 6.0:
This is my code. It is not working perfectly [is this irony?]
For i = 1 To LstLog.ListItems.Count
For j = 1 To LstLog.ColumnHeaders.Count - 1
REC.Open "insert into xyz (EmpID, LogID,CheckTime,SensorID) Values ('" & _
LstLog.ListItems(i).SubItems(j) & "','" & _
LstLog.ListItems(i).SubItems(j) & "','" & _
LstLog.ListItems(i).SubItems(j) & "','" & _
LstLog.ListItems(i).SubItems(j) & "' )", CN, _
adOpenStatic, adLockBatchOptimistic
Next j
Next i