Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to work with cursors with vb-odbc pass through ?
In Access 97 you could:
1. Create a Pass through Query with your SELECT statement. 2. Open a RecordSet based on the pass through query. 3. use the DAO methods MoveFirst, MoveNext,MovePrevious etc. to access therecords.
Exampel:
If your pass through query is named PTQ then you could do something like
this:
......
DIM MyDB as Database
DIM RS as RecordSet
SET MyDB = CurrentDB()
SET RS = MyDB.OpenRecordSet("PTQ")
If NOT (RS.EOF And RS.BOF) Then
' The Recordset i NOT empty
RS.MoveFirst ' Move cursor to the first record.
' The fields can be accessed using RS.Fields(0),RS.Fields(1) ...
End If
For further information. See Access 97 help about Data Access Objects (DAO), RecordSet etc.
Alternatives (I haven't tried any of them yet):
Use ODBC-direct (comes with Access 97): Should be faster. Doesn't use the
Jet Engine.
Use Oracle Objects For OLE (OO4O) (comes with the Oracle Installation CD):
Skip ODBC. Direct access to Oracle throug SQL*Net.
Greetings Jens Waldorff
![]() |
![]() |