Suggestion: phase out old MySqlCommandBuilder constructor syntax
Posted by: Yvan Rodrigues
Date: October 22, 2006 04:28PM

Like the subject says it was a lot of work to change all my uses of the MySqlCommandBuilder (that used the LastWins) constructor to the new format (requiring setting the ConflictOption property).

I understand this is due to the change in the inherited DbCommandBuilder class, but the addition of another constructor like the following would help others migrate.


[System.Obsolete("The MySqlCommandBuilder (MySqlDataAdapter adapter, bool LastWins) has been deprecated. See http://msdn2.microsoft.com/en-us/library/system.data.common.dbcommandbuilder.conflictoption.aspx";)]
public MySqlCommandBuilder (MySqlDataAdapter adapter, bool LastWins) {
// set the ConflictOption based on deprecated parameter
this.ConflictOption = LastWins ? System.Data.ConflictOption.OverwriteChanges : System.Data.ConflictOption.CompareAllSearchableValues;

// execute the new constructor
this.MySqlCommandBuilder(adapter);
}

Options: ReplyQuote


Subject
Written By
Posted
October 11, 2006 12:23AM
Suggestion: phase out old MySqlCommandBuilder constructor syntax
October 22, 2006 04:28PM


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.