Which async call use for DB connection and still responsive GUI?--

Posted by Jade on Stack Overflow See other posts from Stack Overflow or by Jade
Published on 2010-05-16T08:20:38Z Indexed on 2010/05/16 8:30 UTC
Read the original article Hit count: 267

Filed under:
|
|

Hi, My application connects to MSSQL but sometimes it takes a while and the GUI is getting frozen. I would like to do the connection on the other thread, I guess BeginInvoke would be the best way (I know about background worker but I would like to learn this). I have studied MSDN page but I did not understand what is the best way to use? They also say that you can use only callback when the thread that called the async.method does not need to know the results...I dont understand it as I believe I can set some variable in the other thread to "pass" the result well. I would just need the GUI to be not frozen while the connection is being established. Thank you for your advice.

© Stack Overflow or respective owner

Related posts about c#

Related posts about multithreading