Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updatable ADO Disconnected Recordset..

Status
Not open for further replies.

Alleyopp

Programmer
Sep 17, 2004
22
US
I have created a query in Access that gets data from a table and also adds a blank colomn. I want to put this info into a recordset and then populate the blank column for the specific rows.. Its a totals column.. I dont want that info put back to the db.
I am attempting to do this by creating a disconnected recordset but I can not make it writable..

Set ohrstTotal = New ADODB.Recordset
sql = ""
sql = "Select * from qry_Quad_OverHead_Totals"
ohrstTotal.CursorLocation = adUseClient
ohrstTotal.CursorType = adOpenKeyset
ohrstTotal.LockType = adLockBatchOptimistic
ohrstTotal.Open sql, gcnn
'Disconnect the recordset
ohrstTotal.MarshalOptions = adMarshalAll
ohrstTotal.ActiveConnection = Nothing

Any ideas would help..
Thanks Alley
 
Is there anything about the query that would preclude it from being updateable. i.e aggregation, no unique field, etc..
sql = "Select * from qry_Quad_OverHead_Totals"

This will destroy the connection.
ohrstTotal.ActiveConnection = Nothing
Perhaps just closing.
ohrstTotal.ActiveConnection.Close
 
Not sure if this would make a difference, but help doc. says you can only use a static cursor for a cursor on the client side.
ohrstTotal.CursorType = adOpenStatic

 
rohalyla, that is correct, but ADO coerces all client side cursors to static regardless of how set, but for documentation purposes it is better to be set static.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top