Page 1 of 1

AutoPrepare bug

Posted: Thu 27 Sep 2007 17:44
by swierzbicki
Hi,

When setting AutoPrepare to true, retreived fields are no more from the same type.

Exemple

Code: Select all

SELECT 
myTable.*,
CASE WHEN myTable.ItemKind in ('CARS') THEN ifnull(myTable.Quantity,0) ELse 0 End As NumberOfCars,
CASE WHEN myTable.ItemKind in ('BIKES') THEN ifnull(myTable.Quantity,0) ELse 0 End As NumberOfBikes
From MyTable

Quantity is an integer type
Set MyQuery AutoPrepare option to true.
Retrieve your persistent fields.
NumberOfCars and NumberOfBikes are retreived as LargeInt

Set MyQuery AutoPrepare option to false.
Retrieve your persistent fields.
NumberOfCars and NumberOfBikes are retreived as Integer


Is this a MySQL Bug ? Is this a MyDAC Bug ?... Should I disable the AutoPrepare function ?

FWIW I'm running Win32 MySQL server v5.0.37-community-nt
I'm using the 5.10.0.10 MyDac version
I'm developping under Delphi 2007 update 3

Posted: Fri 28 Sep 2007 11:38
by Antaeus
It is likely that this is an issue of MySQL, but I cannot assert it as I could not reproduce the problem. Could you send me a complete small sample at mydac*crlab*com to reproduce it? Include the script to create and fill myTable.