Bug #48601 MySqlCommandBuilder ReturnGeneratedIdentifiers Property does not exist
Submitted: 6 Nov 18:15 Modified: 11 Nov 16:52
Reporter: Matthew Bilek
Status: Documenting
Category:Connector/Net: Docs Severity:S2 (Serious)
Version:6.1 OS:Any
Assigned to: Tony Bedford Target Version:
Tags: MySQL Connector/NET ReturnGeneratedIdentifiers

[6 Nov 18:15] Matthew Bilek
Description:
When I attempted to compile my existing code with the MySQL Connector/NET 6.1.2 is
receive the following message: 'MySql.Data.MySqlClient.MySqlCommandBuilder' does not
contain a definition for 'ReturnGeneratedIdentifiers'.

I have found a link of http://lists.mysql.com/commits/81553 that indicates that the
developer Reggie Burnett has committed code to the 6.1 branch that removes
ReturnGeneratedIdentifiers code from CommandBuilder.cs program.  He mentions that 'We are
now treating the command builder the same as SqlClient'.  But there is no indication of a
workaround or another method in obtaining generated identifiers.

Also, MySQL documentation still shows that this property is available and effective in
obtaining auto-incremented columns. 
http://dev.mysql.com/doc/refman/5.1/en/connector-net-faq.html

How to repeat:
Write a C# program utilizing the command builder object and setting the
ReturnGeneratedIdentifiers property to true.  The compile will fail.

Suggested fix:
Back out the code changes of the ReturnGeneratedIdentifiers property in the
CommandBuilder.cs program or provide another way to obtain
"GeneratedIdentifiers"/auto-incremented information.
[6 Nov 18:52] Tonci Grgin
Hi Matthew and thanks for your report.

Alas, this is intentional and won't be supported any more... We are doing it like
SqlClient does it. Command builder no longer attaches a "select last_inserted_id()" for
you but you need to do it manually.

Tony, please note this in manual, where appropriate, if needs be.
[11 Nov 16:52] Matthew Bilek
Tony,

You commented "Command builder no longer attaches a "select last_inserted_id()" for you
but you need to do it manually."

Could you explain this in more detail.

Thanks,
Matthew