
Problem with Cancel a Query...
Hi There,
I have a problem with cancel a query which takes long time...
If I cancel the query before the first fetch back, then it freeze the
application.
It happens when I use ADO (DSN & DSNless), and RDO as well...
The Database I'm using is Oracle 7.3.3, and Oracle ODBC driver version
is 2.5 (when I use ODBC)
Could you please try the code out and help me to find out what is the
problem?
Thanks a lot... Wenbin
Dim MyConn As ADODB.Connection
Dim MyRec As ADODB.Recordset
Dim ConnectString As String
Dim sSQL As String
' ConnectString = "Provider='" & "MSDAORA" & "';Password='" & "Pass" &
"';User ID='" & "User" & "';Data Source='" & "DS" & "'"
Set MyConn = New ADODB.Connection
MyConn.Open ConnectString
sSQL = "Select * from Area"
Set MyRec = New ADODB.Recordset
MyRec.CursorLocation = adUseClient
MyRec.Open sSQL, MyConn, , ,adAsyncExecute ' or asAsyncFetch
If CBool(MyRec.State and adStateExecuting) then
MyRec.Close The program hang here....
EndIf