Time consuming Stored Proc + Progress bar
-
I have this giant stored procedure executing many small queries. In between these queries, i want to be able to return a record or just some number to the record set so that i can update the value for a progress bar in my program. I have the asyncFetch part set when i do an open: Set mRS = New ADODB.Recordset mRS.CursorType = adOpenStatic mRS.CursorLocation = adUseClient mRS.LockType = adLockBatchOptimistic mRS.Properties("Initial Fetch Size") = 1 mRS.Open sTmp, gdb, adOpenStatic, adLockBatchOptimistic, adCmdText + adAsyncExecute + adAsyncFetch I also set up an event in VB to catch the record set's fetch: Private Sub mRS_FetchProgress(ByVal Progress As Long, ByVal MaxProgress As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) Debug.Print "Fetch: " & Progress & _ " Max: " & MaxProgress End Sub .. but it never gets there. -- modified at 20:33 Wednesday 21st December, 2005