Error with MySQL 5.0.37 and MyDAC 5.0.00.5

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
patyi
Posts: 14
Joined: Wed 01 Feb 2006 20:55

Error with MySQL 5.0.37 and MyDAC 5.0.00.5

Post by patyi » Thu 19 Apr 2007 14:04

Before I report an error with MySQL 4.0.18 and say that the MyDAC 5 has no error with thies query. This is true but I found another query witch is reproduce same error on MySQL 5.0.37 and MyDAC 5.0.00.5 : In func IsBracketPresent delimited value not allowed (... , line 947). The fallowing example wil help You to reproduce thise error :

/*
SQLyog Community Edition- MySQL GUI
Host - 5.0.37-community-nt
*********************************************************************
Server version : 5.0.37-community-nt
*/
create table `finans` (
`tipk` varchar (15),
`red` double ,
`datum` date ,
`dospece` date ,
`idskl` double ,
`racun` varchar (15),
`opis` varchar (100),
`dug` Decimal (18),
`uplata` Decimal (18),
`kasa` varchar (10),
`radnik` varchar (10),
`tip` varchar (3),
`dok` double
);
insert into `finans` (`tipk`, `red`, `datum`, `dospece`, `idskl`, `racun`, `opis`, `dug`, `uplata`, `kasa`, `radnik`, `tip`, `dok`) values('VIR PROMET','6395','2007-02-05','2007-02-25','244','00976','VIR Izl: 1557 Rač: 00976/07','566.40','0.00','ARCUS','tanja','OTP','1557');
insert into `finans` (`tipk`, `red`, `datum`, `dospece`, `idskl`, `racun`, `opis`, `dug`, `uplata`, `kasa`, `radnik`, `tip`, `dok`) values('VIR PROMET','7049','2007-02-19','2007-03-11','244','01459','VIR Izl: 2268 Rač: 01459/07','430.00','0.00','ARCUS','tanja','OTP','2268');
insert into `finans` (`tipk`, `red`, `datum`, `dospece`, `idskl`, `racun`, `opis`, `dug`, `uplata`, `kasa`, `radnik`, `tip`, `dok`) values('VIR PROMET','7073','2007-02-19','2007-03-11','244','01465','VIR Izl: 2276 Rač: 01465/07','11163.90','0.00','ARCUS','tanja','OTP','2276');


/*
SQLyog Community Edition- MySQL GUI
Host - 5.0.37-community-nt
*********************************************************************
Server version : 5.0.37-community-nt
*/
create table `klijenti` (
`idskl` double ,
`status` varchar (3),
`naziv1` varchar (30),
`naziv2` varchar (30),
`adresa` varchar (30),
`posta` varchar (10),
`grad` varchar (30),
`tel` varchar (30),
`fax` varchar (30),
`mob` varchar (30),
`email` varchar (30),
`racun` varchar (30),
`banka` varchar (30),
`pib` varchar (30),
`rabat` Decimal (7),
`napomena` blob ,
`duglimit` Decimal (18),
`pdv` varchar (15),
`matbr` varchar (15),
`regbr` varchar (15),
`sifdel` varchar (15)
);
insert into `klijenti` (`idskl`, `status`, `naziv1`, `naziv2`, `adresa`, `posta`, `grad`, `tel`, `fax`, `mob`, `email`, `racun`, `banka`, `pib`, `rabat`, `napomena`, `duglimit`, `pdv`, `matbr`, `regbr`, `sifdel`) values('244','KUP','ALSASH DOO',NULL,'TRG REPUBLIKE 8','24000','SUBOTICA','?','?','?','?','?','?','104209730','0.00','','0.00','?','?','?','?');

procedure TForm1.FormShow(Sender: TObject);
begin
with MyQuery1 do begin
Close;
SQL.Clear;
SQL.Add('SELECT F.racun, MAX(F.dospece), SUM(F.dug-F.uplata) izn '+
'FROM (finans F, klijenti K) '+
'WHERE F.idskl = 244 AND F.idskl = K.idskl AND '+
'K.stat = "KUP" AND LEFT(F.tipk,3) = "VIR" AND '+
'F.racun NOT IN(""," ","0") '+
'GROUP BY F.racun '+
'HAVING ROUND(izn,2) 0.00 '+
'ORDER BY F.dospece, F.racun';
Open;
end;
end;

Maigth bee this is fixed with previous error, but I think beter to check it !

Thank You for quick responding !

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Fri 20 Apr 2007 07:41

Thank you for information.
We have reproduced the problem and fixed it.
This fix will be included in the next build of MYDAC 5.
Please watch for announcements at the forum.

Post Reply