Microsoft Cursor Engine error '80004005'

Discussion in 'Classic ASP' started by bestip, Jul 2, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi guys,

    Please help me in following code, i am getting the following error when i am trying to delete my all records of ms sql server table.

    '==============ERROR==================

    Microsoft Cursor Engine error '80004005'

    Key column information is insufficient or incorrect. Too many rows were affected by update.

    /test/coo.asp, line 14


    '==============CODE===================
    <%
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=discount asp server;UID=userid;PWD=password;DATABASE=DB_Name"

    Set dt = Server.CreateObject("ADODB.RecordSet")
    dt.CursorLocation = 3

    dSQL = "Select *from table_name"
    dt.Open dSQL,Conn,3,2
    if not dt.EOF Then totrr = dt.RecordCount

    for x = 0 to totrr
    if not dt.EOF Then
    dt.Delete

    dt.MoveNext
    End if
    Next

    Response.Write "All Records Deleted"

    %>
    '-------------------------------------


    Thank You
     
  2. Anyone Here, Who can reply me ?
    [:(][:(][:(]
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page