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