Bug #10306 the UpdateCommand affected 0 records (when da.Update)
Submitted: 2 May 2005 7:56 Modified: 30 Jun 2005 15:10
Reporter: StuFF mc Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:1.0.4 - .NET 1.1 or .NET 2.0 OS:Fed. Core Rel. 1 (Client XP)
Assigned to: Assigned Account CPU Architecture:Any

[2 May 2005 7:56] StuFF mc
Description:
Tested on both .NET 2.0 AND .NET 1.1, the simple Sample is not even working... I get "the UpdateCommand affected 0 records." when trying to update.

How to repeat:
Use the Sample with an ISAM Table
[2 May 2005 10:10] StuFF mc
I think I found where the problem is... First of all, the Sample forgets to do a "da.UpdateCommand = cb.GetUpdateCommand()", so the DA cannot update (or insert or delete) withour having this. 

Then, the biggest problem with this CommandBuilder in .NET, it's that it's tought for bad database designs, so it will do a Where on All your columns. As my Database have always one field being the auto increment primary key, I "rewrite" the where by just making it "Where PK=Value", modifying the da.UpdateCommand.CommandText
[17 May 2005 7:23] Vasily Kishkin
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.

Additional info:

Sorry. But ISAM is deprecated. You need to start using MyISAM engine
[17 May 2005 7:28] StuFF mc
Sorry ?? Not the last version ? I'm using the connector 1.0.4 and MySql 5.0.4, as far as I know both last versions....
[23 May 2005 7:16] Vasily Kishkin
I mean We don't support ISAM database now
[23 May 2005 10:03] StuFF mc
Sorry. By saying "ISAM" I meant "MyISAM" ;) So what now ? ;=)
[24 May 2005 9:06] Vasily Kishkin
Could you please to send any test case for clear understanding your problem ?
[24 Jun 2005 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".