Problem with Cancel a Query... 
Author Message
 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



Sat, 13 Apr 2002 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Rdo and Oracle Cancel Query Problem

2. Problem with canceling an Rdo/Oracle query.

3. Cancel Query, RollBack problem?

4. cancel a running query?

5. How to cancel a VB3.0 Access Query?

6. Question - how to cancel ADO query in progress

7. How cancel a query from vb?

8. : Cancel a running SQL query

9. Cleanly cancel a query.

10. how to cancel a query ?

11. Canceling a long Query?

12. Cleanly cancel a query.


 
Powered by phpBB® Forum Software