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

Home -> Community -> Usenet -> c.d.o.misc -> ADO FetchProgress with MSDAORA OLE DB provider

ADO FetchProgress with MSDAORA OLE DB provider

From: jhk <__at_gsk.com>
Date: Thu, 18 Apr 2002 11:32:21 -0400
Message-ID: <a9mofm$cbk$1@phunn2.sbphrd.com>

Why does the Open method for the Recordset object behave synchronously when using adFetchAsync?

MDAC2.7
MSDAORA provider
Oracle SqlNet 81720
VB6 SP5

I have followed the suggestions from MSDN (HOWTO: Q262311) to make this work.

Code snippet below:

;module level
Dim WithEvents mRS As ADODB.Recordset

Public Function Retrieve() As Long

        Set mRS = New ADODB.Recordset
            Dim strSQL As String
            strSQL = madoCom.CommandText
            mRS.CursorLocation = adUseClient
            mRS.Properties("Initial Fetch Size") = 0
            mRS.Properties("Background Fetch Size") = 5

            mRS.Open strSQL, DBSvc.DB, , , adAsyncFetch


' This call behave synchronously, why??
' Are there other MSDAORA properties that need to be set ?
' I have tried to bump the thread priority,
mRS.Properties("Background thread Priority") = 2 ' this didnt
help

End Function

' For a large recordet (i.e. > 1000) this event is only fire once, why? Am I incorrect in believing 1000 is large ?

Private Sub mRS_FetchProgress(ByVal Progress As Long, ByVal MaxProgress As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

    Debug.Print "Number of records retrieved so far is " + CStr(Progress) End Sub

Private Sub mRS_FetchComplete(ByVal pError As ADODB.error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

    Debug.Print "Status is " + CStr(adStatus)     mRetrieved = True
    mbooAsyncRecordset = False
End Sub

Thanks, John Received on Thu Apr 18 2002 - 10:32:21 CDT

Original text of this message

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