I have 2 tables, one that holds foreign keys for the other table.<BR><BR>I get 2 sets of records and try to delete set of records for each of the foreign keys (groups of upto 5 records each) as I move next in the foreign keys table.<BR><BR>I get the following error every few records and when I refresh the screen, the deletion continues, until all the records are deleted.<BR><BR>ERROR:<BR>Microsoft Cursor Engine error &#039;80004005&#039; <BR><BR>Insufficient or incorrect key column information; too many rows affected by update. <BR><BR>/deletestudentcourse.asp, line 26 <BR><BR>line 26 = RS.Delete.<BR><BR>I&#039;m using folloing code for the recordset:<BR><BR>function getupdaterecordset (strSql, conn)<BR> dim temp<BR> set temp = Server.CreateObject("ADODB.RecordSet")<BR> temp.CursorLocation = adUseClient<BR> temp.CursorType = adOpenStatic<BR> temp.LockType = adLockOptimistic <BR> temp.Open strSql,conn<BR> set getupdaterecordset = temp<BR>end function<BR><BR><BR>Thanks<BR>Dipak<BR>