PROGRESSBAR
Olá
Como eu posso atualizar uma progressbar enquanto aplicação roda uma stored procedure
Como eu posso atualizar uma progressbar enquanto aplicação roda uma stored procedure
Rx gomes tem uma maneira sim, vc vai ter de criar uam tabela aonde vc coloca a porcentagem .. oia o codigo ve se te ajuda
Private withevents M_Conn as adodb.connection
Private CmdFinished as boolean
sub somesub
AdoCmd.Execute , , adAsyncExecute
do while not CmdFinished
doevents
[ô]Aqui vc coloca o codigo que le a tabela em que esta a porcentagem e carrega no progress bar ..
loop
end sub
[ô]Change the CmdFinished value on the connection_ExecuteComplete event and connection_WillExecute
Private Sub M_Conn_ExecuteComplete(ByVal RecordsAffected As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection)
[ô][ô][ô][ô]
CmdFinished = True
End Sub
Private Sub M_Conn_WillExecute(Source As String, CursorType As ADODB.CursorTypeEnum, LockType As ADODB.LockTypeEnum, Options As Long, adStatus As ADODB.EventStatusEnum, ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection)
CmdFinished = False
End Sub
Private withevents M_Conn as adodb.connection
Private CmdFinished as boolean
sub somesub
AdoCmd.Execute , , adAsyncExecute
do while not CmdFinished
doevents
[ô]Aqui vc coloca o codigo que le a tabela em que esta a porcentagem e carrega no progress bar ..
loop
end sub
[ô]Change the CmdFinished value on the connection_ExecuteComplete event and connection_WillExecute
Private Sub M_Conn_ExecuteComplete(ByVal RecordsAffected As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection)
[ô][ô][ô][ô]
CmdFinished = True
End Sub
Private Sub M_Conn_WillExecute(Source As String, CursorType As ADODB.CursorTypeEnum, LockType As ADODB.LockTypeEnum, Options As Long, adStatus As ADODB.EventStatusEnum, ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection)
CmdFinished = False
End Sub
Tópico encerrado , respostas não são mais permitidas