Angel
Thu Nov 18 19:16:19 CST 2004
make sure that you are creating a new connection in each form, specifically
I would recomend the "using" statement to avoid leaks.
Using the same connection in multiple threads is not supported.
--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET:
http://weblogs.asp.net/angelsb/
"vb" <vb@discussions.microsoft.com> wrote in message
news:A370DFB7-48A6-44C8-82EC-7FE41D907FB7@microsoft.com...
> I have few forms that I am trying just to display the data.
>
> In each form I need to fire different sqlstatements to get the data.
Before
> executing each sql statement I am opening the connection, executing
> sqlreader, closing sqlreader and closing the connection. Sometimes I get
> errors like SQL connection is already open or sqlcon is busy fetching etc.
>
> What is the better approach for me to accomplish this.
>
> Thanks
>
>
>
>
>
>
>
>
>
>
>