View Full Version : Multiple concurrent ado recordsets?


PeterOC
01-07-2008, 08:32 PM
Is it possible to have multiple concurrent recordset objects open at the same time. I'm converting dao code to ado for an access 2003 adp project that I've upsized to sql server 2003.

I know it's possible in dao but whilst converting ado doesn't seem to be able to handle this. I need to have the 2 recordsets open and available for editing as this occurs in the dao code. rst1 references rst and updates are performed based and the values therein.

boblarson
01-07-2008, 09:14 PM
Yes, you can, but if the tables are internal or linked then you need to set a single connection object like this:

Dim cnn As ADODB.Connection

Set cnn = CurrentProject.Connection



or you can just use the CurrentProject.Connection within your recordset open code.

PeterOC
01-14-2008, 04:25 PM
Thanks for the reply Bob. I've got it working now. Converting DAO to ADO isn't the headache I thought it would be.

boblarson
01-14-2008, 06:30 PM
Glad to hear you are good to go :)