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

Home -> Community -> Usenet -> c.d.o.server -> Do Oracle ODBC drivers support asynchronous mode? If so, which ones and how?

Do Oracle ODBC drivers support asynchronous mode? If so, which ones and how?

From: Pavel Sustr <Pavel.Sustr_at_cristal.cz>
Date: 2000/04/03
Message-ID: <8c9f68$2cm$1@ns.felk.cvut.cz>#1/1

Hello,

Problem:



We have a MFC application running on Windows 2000 that uses Oracle ODBC driver(s). How can we cancel an SQL query?

What we've tried:



We've tried to use two ODBC drivers, Oracle73 driver version 1.15.03.01 (as displayed in the ODBC Data Source Administrator) and Oracle ODBC driver version 8.01.05.00. We've tried using asynchronous mode:
// =====================================================
// 1) Check whether the driver supports asynchronous mode
// =====================================================
retcode = SQLGetInfo(hdbc1, SQL_ASYNC_MODE, &nAsync, sizeof(nAsync), &nResult);
// =====================================================
// 2) Never mind (explained later). Specify that hstmt1 is to be executed asynchronously.
// =====================================================
retcode = SQLSetStmtAttr(hstmt1, SQL_ATTR_ASYNC_ENABLE,(void*) SQL_ASYNC_ENABLE_ON, SQL_NTS);
// =====================================================
// 3) Try to execute the command
// =====================================================
while ((retcode = SQLExecDirect(hstmt1, (unsigned char*)(LPCSTR)sqlCommand, SQL_NTS)) == SQL_STILL_EXECUTING)
{
...
SQLCancel(hstmt1);
...
}

It seems to me that Oracle73 driver supports asynchronous mode (despite the fact that whenever asked, using SQLGetInfo(...SQL_ASYNC_MODE...), it replies NO) but Oracle 8i doesn't! How come? If that's the case, will future Oracle ODBC drivers support it?

Any comments appreciated. Thank you in advance.

Pavel Sustr
CRISTAL Software CZ Received on Mon Apr 03 2000 - 00:00:00 CDT

Original text of this message

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