Hi,<BR><BR>I have an ASP script which connects to a Sage datasource through an ODBC DSN (cant do DSN-less). Anyway, the script selects two columns from a table and populates a RecordSet as normal. I then have a Do While Not objRS.EOF statement which loops through the RecordSet and populates an array using the two columns I pulled from the table.<BR><BR>The problem is that _occationally_ I get<BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E23)<BR>Row handle referred to a deleted row or a row marked for deletion.<BR>/sage/reportfunctions.asp, line 447<BR><BR>Line 447 being the line just after the Do While statement. Line 447 goes something like: <BR><BR>strKey = objRS(strCodeColumn)<BR><BR>The funny thing is that if I do a ctrl-F5 refresh then the script will execute fine. The error is purely random but occurs on several lines where the code is similar to the above. My guess is that sometimes Sage falls flat on it&#039;s face and returns records which do not match the records I asked for.<BR><BR>I thought I could perhaps code a way to catch the error event and refresh the page but I am not too sure how to do it as I&#039;ve never used the error object. I am also wary because this could cause an endless loop if there is a genuine error.<BR><BR>I thought I&#039;d throw it up on this message board to see what you guys though. Thanks for any help and/or input :)<BR><BR>Stuart