Decimal fiels dosen't work with MySql 5.0 - and DAC version 4.40.0.21

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pjungersen
Posts: 6
Joined: Mon 11 Dec 2006 17:39

Decimal fiels dosen't work with MySql 5.0 - and DAC version 4.40.0.21

Post by pjungersen » Sun 31 Dec 2006 10:29

Opgrade of my SQL server from 4.xx to 5.0 and upgrade of DACfrom version 3.5 to 4.4.0.21 cause problems.

All runing in Delphi version 7.0

SQL for creating table with data
CREATE TABLE mytab (DecimalCol decimal(10,2 ));
INSERT INTO mytab value(12.5);

Now make a simple query from Delphi 7
SELECT * FROM mytab;

Result:
UnKnown MySQL datatype(246) (D:\Project\Delphi\MyDac\Source\MyClasses.pas, line 878)


What to do?

/Per

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 02 Jan 2007 10:46

This field type is supported in the last MyDAC version. Probably you have some files left from previous version of MyDAC on your hard drive. Try to uninstall MyDAC and remove all the files concerned to it. Then install MyDAC one more time. To remove all vestiges of MyDAC, please follow these instructions:

1) Close IDE
2) Uninstall MyDAC
3) Search for MyAccess.*, DBAccess.*, mydac*.bpl, dac*.bpl etc files at your HDD and delete them
4) Remove from the project directory all files made by compiler and linker
5) Remove from the registry (HKCU\Software\Borland\Delphi\7.0\Known Packages) all the links to MyDAC packages (mydac*.bpl, dac*.bpl)
6) Run IDE and check that it is started without errors
7) Close IDE
8) Install MyDAC once more

You can check the MydacVersion variable at runtime to determine exact version of MyDAC.

pjungersen
Posts: 6
Joined: Mon 11 Dec 2006 17:39

Post by pjungersen » Tue 02 Jan 2007 11:46

Have follow the guidelines. - Even included a restart of machine

The problem is gone for single table - if table with decimal is joined - then the an errormessage - tells that table xx - doesn't exist
(Only a problem in MySql5 not MySQL4)

MySQLBuilder don't like decimal fields. Error in line 878 - same as error message below/above

CRDBGrid is gone where to find it?

/Per

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 02 Jan 2007 12:28

> CRDBGrid is gone where to find it?
Please check if the CoreLab Controls package is installed(see Component | Install Packages). If this package appears in the list an it is disabled (it is not ticked off), just enable it.

> MyDac don't like queries with joins - if one of the tables has decimals fields inside
Please supply us with an example to reproduce erroneous behaviour of MyDAC.

pjungersen
Posts: 6
Joined: Mon 11 Dec 2006 17:39

Post by pjungersen » Tue 02 Jan 2007 13:40

> CRDBGrid is gone where to find it?
Please check if the CoreLab Controls package is installed(see Component | Install Packages). If this package appears in the list an it is disabled (it is not ticked off), just enable it.
Ups - works now - thanks
> MyDac don't like queries with joins - if one of the tables has decimals fields inside
Please supply us with an example to reproduce erroneous behaviour of MyDAC.
Ups again a setting problem on at mysql 5.0 (sorry) - thanks

Post Reply