Can anyone give me an example scenario where Asynchronous Callback should be used in an Winforms Database application?
And also an example scenario where Asynchronous Callback must be used in an Winforms database application?
Can anyone give me an example scenario where Asynchronous Callback should be used in an Winforms Database application?
And also an example scenario where Asynchronous Callback must be used in an Winforms database application?
I can't give you a sample of when you must use asynchronous calls, but in general you would want to make any database call that might take a long time in an asynchronous manner to keep your UI responsive and offer the user the possibility to cancel the operation. An given the nature of database call, most (if not all) of them would qualify.
Regarding the method of achieving the asynchronousity, I would probably prefer using a BackgroundWorker over using Begin/EndInvoke
and IAsyncResult
.