Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Progress Bar
Message
From
16/07/2003 12:59:45
 
General information
Forum:
Visual Basic
Category:
Other
Title:
Miscellaneous
Thread ID:
00769590
Message ID:
00810729
Views:
29
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
Map
View

Click here to load this message in the networking platform