PDA

View Full Version : Microsoft Cursor Engine error '80004005'


bestip
07-02-2004, 08:57 AM
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

bestip
07-04-2004, 04:24 AM
Anyone Here, Who can reply me ?
[:(][:(][:(]