|
-
August 20th, 2008, 03:24 AM
#1
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
-
October 3rd, 2008, 02:23 AM
#2
Re: Error in TableAdapter.Update
Some of us we only Understand English, Try to Show us the Exception in English
-
October 3rd, 2008, 02:35 AM
#3
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
-
October 18th, 2008, 03:44 AM
#4
Re: Error in TableAdapter.Update
Please try to Post your while code in DAL that does this Operation. Something is not initialized.
-
October 21st, 2008, 03:03 AM
#5
Re: Error in TableAdapter.Update
Thanks.
I have changed my mind, and no longer use this code.
-
November 11th, 2008, 06:44 AM
#6
Re: Error in TableAdapter.Update
lol hahahahaha
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|