If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ASP / ADO Updating large Data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-17-03, 14:32
LogicMate LogicMate is offline
Registered User
 
Join Date: Feb 2003
Posts: 1
Unhappy ASP / ADO Updating large Data

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)
Reply With Quote
  #2 (permalink)  
Old 02-26-03, 08:34
imadhu79 imadhu79 is offline
Registered User
 
Join Date: Feb 2003
Location: London
Posts: 3
ASP

Hi,

I need to import data to SQL7.0 through ASP somebody can help in sending the code or steps how to import?Please help me....

Madhusudanrao.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On