Archives of the TeradataForum
Message Posted: Sat, 09 Dec 2000 @ 08:05:19 GMT
In the implementation of the Teradata ODBC driver, the count of rows is available before having to use a SQLfetch statement, just as it is in CLIv2 before getting the data parcels. This is not the case in other databases, as the implementation of the SQLRowCount is defined by the implementation. In the Oracle ODBC driver for example, it may still be that a call to SQLRowCount causes the driver to issue the statement twice...
So, the programmer would use a calling sequence something like:
HANDLE Hstmt; // declare handle SQLStmtAlloc(Hstmt); // allocate statement handle SQLExecDirect(Hstmt,"SQL STMT"); // execute the statement SQLRowCount(Hstmt, &iRowCount) // get the Rowcount from the parcel header info My_Routine_To_Notify_User_Of_Row_Count(iRowCount) // notify the user of the count SQLFetch(Hstmt,...) // Fetch rows if the user says yes...
Also, it's kind of hard to find in the Microsoft documentation anymore, but it is still there. Below is the URL to the online ODBC specifications, which will have the callouts for all of the ODBC routines your looking for.
A number of years back, we did a lot of ODBC programming using both the lower and higher level interfaces like RDO, ADO and the rest of the ilk). If either of you have any questions, call me, I would be happy to talk about it. You just might convince me to rummage around the old coding heap to find some examples for the Unix version of the Teradata ODBC driver...
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|