Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    1

    Unhappy Unanswered: 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)

  2. #2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •