Re: ConnectionPooling and the new parameter_collection.cs
Posted by: Yvan Rodrigues
Date: November 22, 2006 12:10PM

I should mention that you should take the same precaution (using RefreshSchema) if there is any chance that the connection has changed in a way that would cause the commandbuilder to try to add a parameter to the collection after it has already done so. Maybe this is a bug.

This is what a stack trace looks like. In this scenario, da.Update has already been called several times, and if I insert a breakpoint in parameter_collection.cs I see that once is has been called, I can do several more Updates without it ever feeling the need to run the commandbuilder again, but on the Nth iteration it does this and breaks at the point in Add() where a parameter is added and it adds its hash to the hashtable.

Explanation? Should I file a bug report?


System.ArgumentException: Item has already been added. Key in dictionary: '?p3' Key being added: '?p3'
at System.Data.Common.DbDataAdapter.UpdatingRowStatusErrors(RowUpdatingEventArgs rowUpdatedEvent, DataRow dataRow)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at MisMabel.EditOrders.AcceptOrder_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)

Options: ReplyQuote


Subject
Written By
Posted
Re: ConnectionPooling and the new parameter_collection.cs
November 22, 2006 12:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.