Bug #53590 after create with MySqlCommandBuilder.GetUpdateCommand() return only 1 records
Submitted: 12 May 2010 5:18 Modified: 13 Aug 2010 18:51
Reporter: sinan ergin Email Updates:
Status: No Feedback Impact on me:
Category:Connector / NET Severity:S2 (Serious)
Version: 6.2.3 OS:Microsoft Windows
Assigned to: Assigned Account CPU Architecture:Any
Tags: GetUpdateCommand(), MySqlCommandBuilder

[12 May 2010 5:18] sinan ergin
Hi dear developer.
I create MySqlDataAdapter1.UpdateCommand with MySqlCommandBuilder.GetUpdateCommand()function. But after this command line, return only 1 rows from table. but this line is canceled, return all rows.
is this a bug? what a problem solution?
regards, thanks..

How to repeat:
[12 May 2010 7:51] Tonci Grgin
Hi Sinan and thanks for your report.

Can you please attach small but complete solution demonstrating your problem so I can check.
[12 May 2010 11:52] sinan ergin
thanks tonci grgin for look at my problem.

my solution code sample is here:
        private void button1_Click(object sender, EventArgs e)
            //opening mysql connection. connection string, prepared beforetime.
            if (mySqlConnection1.State != ConnectionState.Open) mySqlConnection1.Open();
            DataTable dttb = new DataTable();
            // prepare of data adapter select command.
            mySqlCommand1.CommandText = "select * from personel";
            mySqlDataAdapter1.SelectCommand = mySqlCommand1;
            // prepare of data adapter insert command, delete command, update command automatically
            MySqlCommandBuilder mysqlCB = new MySqlCommandBuilder(mySqlDataAdapter1);
            mySqlDataAdapter1.InsertCommand = mysqlCB.GetInsertCommand();
            mySqlDataAdapter1.DeleteCommand = mysqlCB.GetDeleteCommand();
            mySqlDataAdapter1.UpdateCommand = mysqlCB.GetUpdateCommand();
            //after 4 rows, data adapter filled data table only 1 rows. this row is first record of personel table. problem is here
            // but this 4 rows canceled, data adapter fill all rows data table.

            bindingSource1.DataSource = dttb;
            dataGridView1.DataSource = bindingSource1;
my software features:
os: windows 7
devolopment ide: vs2008
mysql database version: 5.5.3-m3-community
mysql .net/connector version: 6.2.3

thanks and regards.
[13 May 2010 11:55] Tonci Grgin
Sinan, this is not a test case, just a prototype of your code... Please review test case I pasted in, let's say, Bug#52187 and provide me with similar. It also helps to turn tracing on to see what you get and to indicate what you expected.

It might prove useful to provide MySQL server version info as well as SQL_MODE server is in.
[14 May 2010 23:45] sinan ergin
Test Solution

Attachment: Test Solution.zip (application/zip, text), 47.36 KiB.

[14 May 2010 23:47] sinan ergin
Tonci, added now my test solution file, creation table script file and mysql variables file.
Thanks for everything.
[23 May 2010 22:43] sinan ergin
Hi Tonci,
Have you found any solution a bug?
Do you continue to be reviewed?
[25 May 2010 6:00] Dmitriy Mamzerov
Hello, I have identical problem... 
It had appeared when I installed new version of mysql database... 
With previous version (5.0) my program worked without this problem.
If you have some solution of this bug write me please.
[25 May 2010 6:02] Dmitriy Mamzerov
Hello, I have identical problem... 
It had appeared when I installed new version of mysql database... 
With previous version (5.0) my program worked without this problem.
If you have some solution of this bug write me please.
[25 May 2010 16:59] sinan ergin
hi dmitriy,
this bug reason mysqlcommandbuilder to change mysqlconnection settings. temporary not use this components, now using odbc components. but waiting for this bug solution.
[7 Jun 2010 22:35] sinan ergin
Hi, Dmitriy and Tonci.
I try connect/net 6.3.2 beta release for this bug. It's work fine. Not errors. Return all rows after mysqlcommandbuilder commands. (maybe fixed this condition beta version. i'm not know.)
please you try 6.3.2 relase, and results writing here.
thanks tonci and dmitriy.

(dmitriy you can download 6.3.2 beta relase from: http://dev.mysql.com/downloads/mirror.php?id=389424)
good luck ;)
[9 Jun 2010 8:48] Dmitriy Mamzerov
Hi, Sinan! I'm installed connect/net 6.3.2, but this problem is not solved...
[15 Jun 2010 23:14] sinan ergin
hi Dmitriy ;)
can you attach your project solution at here? (and attach your table create script)
sometimes sqlmode or other variables changing solved the problem.
i'm not solved 6.2.3 version this problem. but after installed 6.3.2 version solved this problem.
i'm waiting your project solution. don't know;)

[16 Jun 2010 4:14] Dmitriy Mamzerov
Test Solution

Attachment: TestNewMySQLserver.rar (application/x-rar-compressed, text), 23.97 KiB.

[16 Jun 2010 9:12] sinan ergin
dmitriy test

Attachment: test.jpg (image/jpeg, text), 38.73 KiB.

[16 Jun 2010 9:19] sinan ergin
Hi Dmitriy.
I tested your solution on my system. It's worked succesfully. But my configration different your system. Therefore, i am attached my configration mysqlvariables files. Plase compare your variables (sqlmode etc.) and uninstall old mysql installation renew mysql installation (delete in programfiles mysql directories).

[13 Jul 2010 18:51] Vladislav Vaintroub
I tried your example. 4 rows are returned each time for me.
I also tried setting non-default character set  and collation to match your settings(latin5). 4 rows returned each time. 

Does it happen each time for you? Or under some specific circumstances?
[13 Aug 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".