Problem in executing consequent queries

M

muster

I ran in a problem when executing series of queries.

Dim Cnxn As New ADODB.Connection
Cnxn.Open CurrentProject.Connection
Dim lngRA As Long, lngOptions As Long
lngOptions = adCmdStoredProc

Cnxn.Execute "qryA", lngRA, lngOptions
Cnxn.Execute "qryB", lngRA, lngOptions
Cnxn.Execute "qryC", lngRA, lngOptions
Cnxn.Execute "qryD", lngRA, lngOptions

aryA would generate tblA, qryB use tblA. qryB would give an error
saying "tblA not found, ...". But when I F5 it runs ok. Seemingly
something not been refreshed.

Any method to refresh? Option prameters? Any other hints?

Thank you,
Muster
 
Top