Hi Eric,
I have write the following code, but still can't synchornize the progress % with the SQL command, could u please take a look and point out my mistake, thanks
Dim WithEvents RS As ADODB.Recordset
Dim loCMD As ADODB.Command
Dim loCN As ADODB.Connection
Private lcCNStr As String
Private Sub Form_Activate()
Set loCMD = New ADODB.Command
Set loCN = New ADODB.Connection
Set RS = New ADODB.Recordset
lcCNStr = "DSN=MS Access Database;DBQ=...ferSize=2048;PageTimeout=5;UID=admin;"
loCN.Open lcCNStr
loCMD.ActiveConnection = loCN
loCMD.CommandText = "select * from [title author]"
Set RS = loCMD.Execute(, , adexecuteasync)
Set loCMD = Nothing
Set loCN = Nothing
Set RS = Nothing
End Sub
Private Sub RS_FetchProgress(ByVal Progress As Long, ByVal MaxProgress As Long, adstatus As ADODB.EventStatusEnum, ByVal precordset As ADODB.Recordset)
Debug.Print Format(Progress / MaxProgress, "0%")
End Sub
Thanks alot
Aston
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only