If you dim your recordset withevents, then you can use the fetchprogress event to build your progress bar... e.g.
Dim WithEvents rs As ADODB.Recordset
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
>Dear All,
>
>After I sent a batch of SQL command to SQL Server, Is it possible to get a progress bar when the command is executing?
>
>Thanks
>Aston
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com