Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> ADO FetchProgress with MSDAORA OLE DB provider
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, , , adAsyncFetchhelp
' 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
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