Page 1 of 1

TMyQuery SQL Generator create wrong code

Posted: Thu 29 Mar 2012 09:27
by ntheato
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"

Posted: Thu 29 Mar 2012 10:58
by kaffeburk
I had the same problem, then i also added "quote names" and the problem was fixed....

Posted: Thu 29 Mar 2012 11:34
by ntheato
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

Posted: Thu 29 Mar 2012 16:03
by AndreyZ
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.