B
BruceTompkins
I am trying to find out how to set up and execute a a pass-through SQL query
from VBA code in an MS Access database application. I have created a
pass-through query that executes an Oracle SQL query successfully when I open
the query in Access. Now I want to open the query in a VBA module using ADO.
I get an error when I try to use the pass-through query when opening a
recordset. I have done the following:
Dim MyConnect As New ADODB.Connection
MyConnect = CurrentProject.Connection
MyConnect.Open
'set up the recordset for pool inventory calculations
Set rstWellRecs = New ADODB.Recordset
rstWellRecs.Open "Oracle Countess Bow Island Well Data Query",
MyConnect, adOpenForwardOnly, adLockReadOnly, adCmdTable
Any help would be appreciated.
Regards, ...Bruce
from VBA code in an MS Access database application. I have created a
pass-through query that executes an Oracle SQL query successfully when I open
the query in Access. Now I want to open the query in a VBA module using ADO.
I get an error when I try to use the pass-through query when opening a
recordset. I have done the following:
Dim MyConnect As New ADODB.Connection
MyConnect = CurrentProject.Connection
MyConnect.Open
'set up the recordset for pool inventory calculations
Set rstWellRecs = New ADODB.Recordset
rstWellRecs.Open "Oracle Countess Bow Island Well Data Query",
MyConnect, adOpenForwardOnly, adLockReadOnly, adCmdTable
Any help would be appreciated.
Regards, ...Bruce