Bug #5669 | MyODBC problems with primary key on multiple fields | ||
---|---|---|---|
Submitted: | 20 Sep 2004 15:46 | Modified: | 13 Sep 2007 1:18 |
Reporter: | Przemyslaw Popielarski | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51 | OS: | Windows (Windows XP SP1) |
Assigned to: | CPU Architecture: | Any |
[20 Sep 2004 15:46]
Przemyslaw Popielarski
[13 Dec 2004 19:39]
MySQL Verification Team
Verified with 3.51.10 and Access 2003.
[27 May 2005 15:39]
Miguel Garcia
hello.. I got the same problem.. when you insert a new record it shows as #deleted#, you close the table/form and open it again and its ok.. I solved this by setting the autonumber field to "0" on the event "Before Update" in the access form.. this way the primary key field has a value before the transaction ends.. when its done the field takes the corresponding autoincrement value.. good luck mike
[13 Sep 2007 1:18]
Jim Winstead
The problem is that Microsoft Access 2003 is using `TRANID` IS NULL as part of the WHERE clause in fetching the data after it has been inserted. But not only is it using that (which is non-standard behavior and disabled by default in the driver), it is doing it twice, once before it commits the transaction, and again after it has committed. MySQL's support for selecting a row with an auto-increment value for this only works once. So even though the record is correctly returned the first time, no record will be returned the second time. I don't see any sensible way around this in the driver. Reports are that Microsoft Access 2007 does not rely on the non-standard 'IS NULL' behavior for auto-incrementing columns.