Private Sub OnInfoMessage(sender As Object, args As SqlInfoMessageEventArgs)
Console.WriteLine(args.Message)
For Each err As SqlError In args.Errors
Console.WriteLine(err.Message)
///Here I want to update ProgressBar.
updateprogress(info)
Next End Sub
Public Sub updateprogress(ByVal info As SqlError)
'ProgressBar1.Value = info.Message.ToString().Substring(10, 2)
_myprogressupdate = New MyProgressUpdate(AddressOf UpdateStatus)
Me.BeginInvoke(_myprogressupdate, info)
End Sub
Private Sub UpdateStatus()
MsgBox("fff")
End Sub
In this code I got console output 4 times.But messagebox shown 4 time after process completed.I am expecting messagbox when I get console output.
Could you please anyone give me an idea?
Thanks.