Problem with ADP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have just upsized my Access MDB to ADP. The following lines work well in
MDB but get an error in ADP.

Dim dbObject As DAO.Database
Dim rstObject As DAO.Recordset
Set dbObject = CurrentDB
Set rstObject = dbObject.OpenRecordset(“MyTableâ€)
With rstObject
………
End With

I know I have to use ADO instead of DAO, Can anyone tell me how to re-write
these codes? Thanks
 
Just started on an ADP project myself.

Here's what I used:


Dim stSQL As String
Dim rsProcess As ADODB.Recordset
Dim cnnADO As ADODB.Connection

Set cnnADO = CurrentProject.Connection
Set rsProcess = New ADODB.Recordset

stSQL = "SELECT * FROM Process"
rsProcess.Open stSQL, cnnADO, adOpenDynamic, adLockOptimistic


The main thing for ADO is that you need to have a connection.
Hope this helps
Diarmuid
 
Back
Top