[unixODBC-support] Problem in using cursor to fetch millions ofrows

Jerry Lam jlam at sandvine.com
Thu Apr 7 02:45:45 BST 2005


In order to facilitate debugging process, is there a way I can turn something on in odbc driver to trace all the communications from tclodbc to unixodbc? I found out that the execute command was used internally in other methods as well but they behave the way they should all behave. The problem only occurs when I create the statement object by myself than it is called for execution it actually does the wrong thing. Any help will be appreciated.

Thank you,


-----Original Message-----
From: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com]On Behalf Of Eric Sharkey
Sent: Wednesday, April 06, 2005 3:58 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Problem in using cursor to fetch
millions ofrows 

> Hi,
> I'm very appreciated the help here. I read the source code in the execute met
> hod, the line that is suspicious to me in the void TclSqlStatement::Execute(T
> cl_Interp *interp, int objc, TCL_CMDARGS) is this:
> while ((rc = SQLExecute(stmt)) == SQL_STILL_EXECUTING) SqlWait(1);

This looks ok.  If the statement is being executed asynchronously,
then SQLExecute will return SQL_STILL_EXECUTING until the execution
is done, at which point it will return SQL_SUCCESS, SQL_ERROR or something
in between.

If the statement is not being executed asyncrhonously, then SQLExecute
will never return SQL_STILL_EXECUTING, so that loop just executes
the statement once and moves on.

Basically, this loop makes it effectively synchronous, regardless of
whether or not the driver is running in a synchronous or asychronous mode.

Whatever your problem is, it isn't there.

unixODBC-support mailing list
unixODBC-support at easysoft.com

More information about the unixODBC-support mailing list