Jason Callas

Its been almost 10 years since I have had to do work with good-old RecordSet objects...

I am filling a RecordSet with data returned from a SQL server via a stored procedure. I then set the ActiveConnection property to Nothing in order to disconnect it so I can make changes to it.

But when I try to set the value on a given row I get back a "Multiple-step operation generated errors. Check each status value" error message. My understanding is that this is indicative of trying to use the wrong datatype. I have verified that the type is correct (I am dealing with integers) so I am at a loss for what the problem could be.

Here is my code:

Set rsPackages = CreateObject("ADODB.RecordSet")

rsPackages.CursorLocation = adUseClient

rsPackages.LockType = adLockBatchOptimistic

rsPackages.Open "EXECUTE stp_FetchPackageData", myConn

rsPackages.ActiveConnection = Nothing

Response.Write("Value: " & rsPackages("TotalCount")) ' returns 0

Response.Write("Data Type : " & rsPackages.Fields("TotalCount").Type) ' returns 3 = adInteger

rsPackages("TotalCount") = 1 ' throws multi-step error

Oddly enough, when I look at the Attribute property of the field I get back a value of 112. When you break it down I think that value indicates the row value is read-only (Could that be my problem Just a really bad/unhelpful error message ) But if I try to change it I get back a message saying cannot be done since RecordSet is already open.



Re: Unable to make changes to disconnected recordset

Arnie Rowland

Hi Jason,

This is more an issue related to using ADO and you may get better response by posting in one of the ADO or Access related forums.

Re: Unable to make changes to disconnected recordset


howabout cloning the recordset instead


then do the manipulation