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 <pXaXvXeXl_sXuXsXtXr_at_geocities.com>
Date: 2000/04/05
Message-ID: <7FDG4.10741$A4.307716@c01read04.service.talkway.com>#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.

PaShu

--
Free audio & video emails, greeting cards and forums
Talkway - http://www.talkway.com - Talk more ways (sm)
Received on Wed Apr 05 2000 - 00:00:00 CDT

Original text of this message

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