I Use MySQL 4.1.9-max (Easy PHP 1.8 )
Code: Select all
SELECT MAX(`id_MyTable`) + 1 AS AutoIncMinAllowedValue FROM `MyTable`id_MyTable is PRIMARY AutoINC
It Work with ADO, with Query Browser, with MyDac 3.55
I receive a Table with one Column "AutoIncMinAllowedValue" and NULL Value, it's OK
But with MyDac 5.90, the fieldname of Fields[0] is #0#0#0
I can't use FieldByName('AutoIncMinAllowedValue') !!!
I circumvented the problem with parenthesis
Code: Select all
SELECT ( MAX(`id_MyTable`) + 1 ) AS AutoIncMinAllowedValue FROM `MyTable`With a No-Empty Table, it's work with any version
Why this changement on MyDAC Version ?
I Use this Request for Repair MyISAM AutoInc value on start-up of programs (sometimes it returns to 1 for no reason), the server run 24/24 for several months without rebooting
Accept English ou French Response