View Full Version : Microsoft Cursor Engine (0x80004005)
ngaisteve1
07-28-2003, 01:27 AM
Microsoft Cursor Engine (0x80004005)
Key column information is insufficient or incorrect. Too many rows were affected by update.
I got this error when I confirm my records. The funny thing is sometimes this error occurs and sometimes not. And when I refresh it, it's ok. Can someone explain this? Thanks.
putts
07-28-2003, 09:26 AM
Ahhh yes, the too many rows affected by the update statement.
I receive this when I accidentally duplicate a table and then try to delete/update a row thru MS SQL Server's Enterprise Manager.
Check your table's Primary Key column to make sure that a duplicate hasn't been created.
That's all I really know about it, so I'm not sure why you would receive it when you confirm and then it goes away, but hopefully my experience might shed a lil light on it.
ngaisteve1
07-28-2003, 08:27 PM
'***********************************************************************************************
' Confirm requisition_form.
set rs_confirm_rq_form = Server.CreateObject("ADODB.Recordset")
set sql_confirm_rq_form = Server.CreateObject("ADODB.Command")
sql_confirm_rq_form = "Select confirm_status FROM requisition_form "
sql_confirm_rq_form = sql_confirm_rq_form & "WHERE running_no = '" & tmpRunNo & "' "
sql_confirm_rq_form = sql_confirm_rq_form & "AND confirm_status = 'Temp' "
rs_confirm_rq_form.CursorLocation = 3
rs_confirm_rq_form.open sql_confirm_rq_form, conn, 3, 3
if not rs_confirm_rq_form.eof then
DO WHILE NOT rs_confirm_rq_form.eof
rs_confirm_rq_form("confirm_status") = "Yes"
rs_confirm_rq_form.update
rs_confirm_rq_form.movenext
LOOP
end if
' ***********************************************************************************************
'***********************************************************************************************
' Confirm requisition_form.
set rs_confirm_issue = Server.CreateObject("ADODB.Recordset")
set sql_confirm_issue = Server.CreateObject("ADODB.Command")
sql_confirm_issue = "Select stock_issuing.confirm_status FROM stock_issuing, requisition_form "
sql_confirm_issue = sql_confirm_issue & "WHERE stock_issuing.confirm_status = 'Temp' and requisition_id = collection_id "
rs_confirm_issue.CursorLocation = 3
rs_confirm_issue.open sql_confirm_issue, conn, 3, 3
if not rs_confirm_issue.eof then
DO WHILE NOT rs_confirm_issue.eof
rs_confirm_issue("confirm_status") = "Yes"
rs_confirm_issue.update
rs_confirm_issue.MOVENEXT
LOOP
end if
'***********************************************************************************************
My code is above. Is it the problem come from second query?
putts
07-29-2003, 10:38 AM
sql_confirm_issue = "Select stock_issuing.confirm_status FROM stock_issuing, requisition_form "
sql_confirm_issue = sql_confirm_issue & "WHERE stock_issuing.confirm_status = 'Temp' and requisition_id = collection_id "
In this query you have 'requisition_id = collection_id' at the end, but you dont specify which tables each field is coming from.
Based on the tables and fields inside them, this could be the issue
ngaisteve1
07-29-2003, 08:11 PM
I got fix already. Anyway, thanks.
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.