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

Home -> Community -> Usenet -> c.d.o.misc -> Trouble with ADO in VB5 with Oracle 7.33 and Oracle 73 driver

Trouble with ADO in VB5 with Oracle 7.33 and Oracle 73 driver

From: Chris Carden <ccarden_at_nospam.gatecom.com>
Date: Wed, 24 Jun 1998 07:48:59 -0400
Message-ID: <3590E7AB.2EB0B6D3@nospam.ford.com>


I am having difficulty after connecting from VB5 to Oracle 7.33 with ADO, using the Oracle 73 driver. It seems that all of the methods are not available (RowCount, for instance). Possibly I am getting the wrong recordset type.

I am able to get a dynamic recordset (adOpenDynamic), or at least I send that parameter and get an error-free connection. And I thought that, a couple days ago, I could MoveNext, MovePrevious, MoveLast, and MoveFirst. Now, all of a sudden, I am only allowed to MoveFirst and MoveNext. On a MoveLast, I get error number -2147217884 "The rowset does not support fetching backwards." Possibly this is a driver problem, but I suspect that either I'm doing something wrong in the code, or it's SOMETHING ELSE (whatever that would be).

The problem-causing code:

  Dim pcnMyDB As ADODB.Connection
  Dim prsPPS As ADODB.Recordset
  Dim pvarResultArray As Variant
  Dim pstrSQLStmt As String
  Dim plngNumRows As Long

  Set pcnMyDB = New ADODB.Connection
  Set prsPPS = New ADODB.Recordset
  pstrSQLStmt = MakeMySQLStatement

' Open a dynamic record set

  prsPPS.Open pstrSQLStmt, pcnMyDB adOpenDynamic, , adCmdText   pvarResultArray = prsPPS.GetRows() 'Fill variant array with record set data
' Get the record count (number of rows) because Recordcount method does
not work
  plngNumRows = UBound(pvarResultArray, 1) - LBound(pvarResultArray, 1) + 1
  prsPPS.MoveLast
' *Boom!*

Thank you, in advance, for any assistance.

Chris Carden
ccarden_at_nospam.ford.com

(Obviously, remove nospam to reply) Received on Wed Jun 24 1998 - 06:48:59 CDT

Original text of this message

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