On Mon, 2009-06-15 at 16:21 -0700, greyman wrote:
> The key there is that
> DataContext should not attempt to open any IDbConnection more than
> once.

This is also wrong.  MSDN explicitly documents[0] that the IDbConnection
will be kept open for as short a period as possible, for each SQL
request sent to the DB.  Consequently, assuming that the IDbConnection
is closed during DataContext construction, it will be .Open()ed
AND .Close()d for each SQL request, which could be more than once.

Specifically, at minimum every DataContext.SubmitChanges() call should
result in both opening and closing the IDbConnection (along with every
query traversal, etc.).

 - Jon

[0] http://msdn.microsoft.com/en-us/library/bb292288.aspx

        A DataContext opens and closes a database connection as needed
        if you provide a closed connection or a connection string.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to