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 -> Re: Trouble with ADO in VB5 with Oracle 7.33 and Oracle 73 driver

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

From: Chris Carden <ccarden_at_nospam.ford.com>
Date: Thu, 25 Jun 1998 10:56:04 -0400
Message-ID: <35926504.55E08B4D@nospam.ford.com>


Thanks. I figured it out ... sort of. It was a combination of a driver problem (maybe Oracle's driver doesn't support all of the ADO methods), the wrong way of opening the connection (there are 4 different ways), and the cursor type for a given SQL query (in this case, I needed to use adOpenStatic because of the complexity of the query).

Chris Carden wrote:
>
> 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 Thu Jun 25 1998 - 09:56:04 CDT

Original text of this message

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