Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle8/NT VB5 Cursor Problem
What I use is:
sTmp = "SELECT Count(*) AS Total FROM " + sFROM + " WHERE " + sWHERE
sFROM, sWHERE are the parts of the original SQL statement.
We started a Software System with ORACLE V 7.3 then 8.03 then 8.0.4 then 8.0.4.4 . All the versions of ODBC have different bugs. Sometimes with the C++ programm and ODBC, sometimes with the VB program. (In VB 5.0 we also use the Connection object, DAO, ...)
This function above is not the fastest, but it works. I was TIRED to check whether some more sophisticated solution would work in each of the versions of this ODBC driver.
A main function returns the recordset and the number but first of all calls the function, that uses the code from above. Of course I have another function that does not count the number, but simply returns the number of records.
If you ever find anything about ODBC from ORACLE please let me know.
Ohh: "same code works against an Oracle 7 machine": does it mean the client is the same, only the server is Version 7 ?
Martin
Mark Hartigan wrote:
>
> I've got a VB5 application (using DAO...ODBC Direct) connecting to Oracle 8
> for NT. I've set up a DSN using the Oracle driver supplied with the
> distribution (Oracle ODBC Driver 8.00.0300) and am having the following
> problems:
>
> When I open a recordset off the connection object, the operation seems to
> work. When I try to access the recordcount property of the recordset,
> though, it returns "-1". If I try to use the MoveFirst or MoveLast methods,
> an error occurs (I think "operation not supported"). If I simply access
> fields in the recordset (i.e. at whatever record it's at after opening), I'm
> able to see data (from the first record).
>
> For what it's worth, the exact same code works against an Oracle 7 machine.
>
> Is there something on the NT client system which needs to be upgraded to
> work with Oracle 8? I couldn't find anything in Oracle's documentation, nor
> could I figure out where to get information about this from there Web Site.
--
Voice: +49(0)711/57151-69
Fax: +49(0)711/57151-99
e-mail: m.friemann_at_delta-ii.de
web: www.delta-ii.de