B
Bob Day
using VS2003, vb net, sql msde...
I am deeply frustrated with DataAdapters (ie DA) created in the Component
Designer. After considerable time spent, it was confirmed to me via this
newsgroup that there is a problem with DA not releasing their connection to
the pool, so if you do 100 DA.UPDATES you then crash because you run out of
connections. I increased the Max Pool = 800 to get around this (in the SQL
Connection String).
Is there a URL that explains all knows problems with the Component Designer?
But now, more problems...
For example, I have two threads. I can have either one of them by iteself
add 200 rows in a loop very quickly to the DataSource (ie add the row to the
DataSet and UPDATE to the datasource, 1 row at a time). If I have both
threads doing the same thing, it fails withing the first 5 rows, with the
error message below. The 200 row loop has nothing to do with it, I will get
this error message at some pont in the normal running of the program (just
not as quickly). I don't use a DataReader anywhere in the program, and
check the connection to make sure it is closed before the update. Error
Message:
"A first chance exception of type System.InvalidOperationException occurred
in System.data.dll.
Additional Information: There is already an open DataReader associated with
this connection which must be closed first."
Below is some code from the Update (notice how I am trying to close
connections).:
Select Case gcConnection.State
Case Not ConnectionState.Closed
Stop
gcConnection.Close()
End Select
' code to fill DT_With_Changes
' Update DataSource from Dataset for this table
Rows_Updated = SQL_Data_Adapter.Update(DT_With_Changes)
Any ideas what is going on?
Thanks!
Bob Day
I am deeply frustrated with DataAdapters (ie DA) created in the Component
Designer. After considerable time spent, it was confirmed to me via this
newsgroup that there is a problem with DA not releasing their connection to
the pool, so if you do 100 DA.UPDATES you then crash because you run out of
connections. I increased the Max Pool = 800 to get around this (in the SQL
Connection String).
Is there a URL that explains all knows problems with the Component Designer?
But now, more problems...
For example, I have two threads. I can have either one of them by iteself
add 200 rows in a loop very quickly to the DataSource (ie add the row to the
DataSet and UPDATE to the datasource, 1 row at a time). If I have both
threads doing the same thing, it fails withing the first 5 rows, with the
error message below. The 200 row loop has nothing to do with it, I will get
this error message at some pont in the normal running of the program (just
not as quickly). I don't use a DataReader anywhere in the program, and
check the connection to make sure it is closed before the update. Error
Message:
"A first chance exception of type System.InvalidOperationException occurred
in System.data.dll.
Additional Information: There is already an open DataReader associated with
this connection which must be closed first."
Below is some code from the Update (notice how I am trying to close
connections).:
Select Case gcConnection.State
Case Not ConnectionState.Closed
Stop
gcConnection.Close()
End Select
' code to fill DT_With_Changes
' Update DataSource from Dataset for this table
Rows_Updated = SQL_Data_Adapter.Update(DT_With_Changes)
Any ideas what is going on?
Thanks!
Bob Day