TMyQuery SQL Generator create wrong code

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ntheato
Posts: 2
Joined: Sun 23 Nov 2008 10:32

TMyQuery SQL Generator create wrong code

Post by ntheato » Thu 29 Mar 2012 09:27

Version Delphi RAD 2010
MyDAC V7.1.5

On the TMyQuery Componet i use the SQL Generator Tab to create the insert, update, delete,.. Statements, but the created code is wrong. The keyfield for update is always the last field in the list from the updatefield list not the selected one in the keyfieldlist.
Also the field row in the created statement is from bottom to top. That is not wrong but unusual and was not ion prevoius releases.
following sample:

UPDATE beleg_rechnungzahlung
SET
mahngebuehr = :mahngebuehr, mahnstufe = :mahnstufe, datumsollzahlung = :datumsollzahlung, info = :info, datumbezahlt = :datumbezahlt, bezahltmwst = :bezahltmwst, skontoabzug = :skontoabzug, bezahltbrutto = :bezahltbrutto, bezahltnetto = :bezahltnetto, idbelegrechnung = :idbelegrechnung, idbelegrechnungzahlung = :idbelegrechnungzahlung
WHERE
mahndatum = :Old_mahndatum

the keyfield which was selected was "idbelegrechnungzahlung"

kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

Post by kaffeburk » Thu 29 Mar 2012 10:58

I had the same problem, then i also added "quote names" and the problem was fixed....

ntheato
Posts: 2
Joined: Sun 23 Nov 2008 10:32

Post by ntheato » Thu 29 Mar 2012 11:34

kaffeburk wrote:I had the same problem, then i also added "quote names" and the problem was fixed....
I tried but same result even with quotes

AndreyZ

Post by AndreyZ » Thu 29 Mar 2012 16:03

We already fixed this problem. This fix will be included in the next MyDAC build. We are going to release the new MyDAC build this week or at the beginning of the next week.

Post Reply