Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to work with cursors with vb-odbc pass through ?

Re: How to work with cursors with vb-odbc pass through ?

From: Jens Waldorff <jens.waldorff_at_teliamail.dk>
Date: 1 Sep 98 18:08:55 GMT
Message-ID: <01bdd517$b785b840$5afcffc2@jw>

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 the
records.

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



> Fra: Loy&Hutz <loyhutz_at_dinx.de>
> Nyhedsgrupper: comp.databases.oracle.server
> Emne: How to work with cursors with vb-odbc pass through ?
> Dato: 19. august 1998 21:37
>
> How to work with cursors with vb-odbc pass through ?
>
> e.g.:
> Select * from Table1 where PK = 123 order by Colx
>
> Then I like to get the next / previous row
>
>
> Where can I get information about this topic ?
> Please give me a code example.
>
> ENVIRONMENT:
> PROBLEMS / TESTED WITH Visual Basic 4.0 16 Bit / Access 2.0 / Access 97 -
> Win NT 4.0 SP3 / Win 95
> ODBC-drviver: Oracle 8.00.0400 (=Version 8.0.4.4.0) (SQORA32.DLL
04.05.98)
> Oracle Server 8.00.4.0-Server
>
> Greetings SvenKunze_at_aol.com
>
>
Received on Tue Sep 01 1998 - 13:08:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US