Ysgrifennodd Max2006:
> Hi,
>
[quoted text clipped - 9 lines]
> Any help would be appreciated,,
> Max
As far as I know you never need to close a connection if you use any
kind of DataAdapter (with a DataSet, of course). I am not aware that it
does any harm, though.
HTH
Peter
Steven Cheng[MSFT] - 12 Jul 2007 03:48 GMT
Hi Max,
I agree with peter that you do not need to explicitly control the open and
close for the SQL connections when using DataAdapter. The dataAdapter's
internal code logic will help you control the connection's open and close.
It is only when you use SqlCommand to return DataReader resultset will you
need to take care of the connection and reader's open and close.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 16 Jul 2007 14:29 GMT
Hi Max,
How are you doing? Have you got any further idea on this? If there is
anything else need help, please don't hesitate to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Max2006 - 17 Jul 2007 16:33 GMT
Hi Steven,
Thanks for followup. I am not explicitly closing the connection when I use
TableAdapter and monitored the connections to database through SQL Profiler.
Everything is working perfect! Thank you
> Hi Max,
>
[quoted text clipped - 9 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.