Error in TableAdapter.Update
Hi gurus,
I'm using VS2005/ADO.NET 2.0 with SQLSERVER 2005.
I'm building a multithreaded application creating a high volume of rows (log&trace data).
Each thread adding row calls :
GoStatDataSet.TraceMessagesRow row = table.NewTraceMessagesRow();
...
lock (changelock)
{
table.AddTraceMessagesRow(row);
}
Then at regular interval thread calls to update database :
lock (changelock)
{
GoStatDataSet dsChanges = (GoStatDataSet)ds.GetChanges();
if (dsChanges != null)
{
adapter.Update(dsChanges);
ds.Merge(dsChanges);
ds.AcceptChanges();
}
}
But the adapter.Update() raise sometimes an exception :
L'exception System.InvalidOperationException n'a pas été gérée
Message="Le handle n'a pas été initialisé."
Source="System.Data"
StackTrace:
Ã* System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
...
Any clue ?
Thanks
Gordon Soda
Re: Error in TableAdapter.Update
Some of us we only Understand English, Try to Show us the Exception in English
Re: Error in TableAdapter.Update
System.InvalidOperationException was unhandled
Message="Handle is not initialized."
Source="System.Data"
StackTrace:
Ã* System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
please :-)
Gordon Soda
Re: Error in TableAdapter.Update
Please try to Post your while code in DAL that does this Operation. Something is not initialized.
Re: Error in TableAdapter.Update
Thanks.
I have changed my mind, and no longer use this code.
Re: Error in TableAdapter.Update