Is it proper to use threading in winforms to retrieve data from a remote sql
server? I thought about setting the timeout period in the connection string,
but what would be better is to start my bind() function in a new thread so
the app isn't tied up searching for the sql server.

Any problems I should be aware of?

-Max

RE: ok to use threading in winforms for remote connections? by AlexKorchemniy

AlexKorchemniy
Mon Oct 18 16:31:06 CDT 2004

There nothing wrong with using a different thread. You just have to make sure
you are doing everything threadsafe. You have to use the Invoke method if you
are doing anything in the UI. See this article:
http://weblogs.asp.net/justin_rogers/articles/126345.aspx

I've heard that next version of .net will have methods for doing
asynchronous command execution. :) Not out yet though.

---
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy

"Max" wrote:

> Is it proper to use threading in winforms to retrieve data from a remote sql
> server? I thought about setting the timeout period in the connection string,
> but what would be better is to start my bind() function in a new thread so
> the app isn't tied up searching for the sql server.
>
> Any problems I should be aware of?
>
> -Max
>
>
>
>