I'm trying to transfer one table to another table throught asp/ado. but after 500 or so records (random) I get the following errors.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Visual FoxPro Driver]SQL: Column 'Q573P119' is not found.
/data/catalog/importinv.asp, line 195
line 195 is where I call the update
I can get rid of this error if I replace this line
strSQL = "update Products set update = .f."
with this
strSQL = "delete from Products"
Set rsProducts= Server.CreateObject("ADODB.Recordset")
rsProducts.CursorLocation = adUseClient
Set trsProducts = Server.CreateObject("ADODB.Recordset")
trsProducts.CursorLocation = adUseClient
strSQL = "update Products set lupdate = .f."
dbc.Execute(strSQL)
rsProducts.Open "Products where !deleted()", dbc, adOpenDynamic, adLockBatchOptimistic, adCmdTable
trsProducts.Open "Products where !deleted()", tdbc, adOpenStatic, adLockReadOnly, adCmdTable
lcRecordCount = trsProducts.RecordCount
lcFieldCount = rsProducts.Fields.Count
If lcRecordCount > 0 Then
trsProducts.MoveFirst
For iCount = 1 to lcRecordCount
rsProducts.Find "ccatalogid='"&trsProducts.Fields("ccatalogid").Va lue&"'", 0, adSearchForward, adBookmarkFirst
If rsProducts.BOF or rsProducts.EOF Then
Response.Write "Add : " & formatnumber(iCount,0) & " "
rsProducts.AddNew
For xCount = 0 to lcFieldCount - 1
rsProducts(xCount) = trsProducts.Fields(rsProducts(xCount).Name).Value
Next
rsProducts("lupdate") = True
Else
Response.Write "Update : " & formatnumber(iCount,0) & " "
For xCount = 0 to lcFieldCount - 1
rsProducts(xCount) = trsProducts.Fields(rsProducts(xCount).Name).Value
Next
rsProducts("lupdate") = True
End If
trsProducts.MoveNext
Next
End IF
rsProducts.UpdateBatch adAffectAll
rsProducts.Close
trsProducts.Close
strSQL = "delete from Products where !lupdate"
dbc.Execute(strSQL)