Hi,
I want to save sql-statements in a TMemoField.
Debug Example:
UPDATE berichte
SET
SQL = :6
WHERE
ID = :Old_1 AND Deleted = :Old_2 AND Name = :Old_3 AND HauptMenu = :Old_4 AND Menu IS NULL AND WFile = :Old_7 AND RFile IS NULL AND Freigabe = :Old_9 AND Seitentitel = :Old_10 AND C_DAT = :Old_11 AND I_dat = :Old_12 AND Adr_ersatz = :Old_13
:6(Memo,IN)=
:Old_1(Integer,IN)=2000
:Old_2(Integer,IN)=1
:Old_3(FixedChar[13],IN)='Dozentenliste'
:Old_4(FixedChar[8],IN)='Berichte'
:Old_7(FixedChar[12],IN)='TN_Liste.dot'
:Old_9(SmallInt,IN)=0
:Old_10(FixedChar[13],IN)='Dozentenliste'
:Old_11(DateTime,IN)=01.01.1980
:Old_12(DateTime,IN)=01.01.1980
:Old_13(SmallInt,IN)=0
Result:
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL, WFile, Freigabe, Seitentitel, C_DAT, I_dat, Adr_ersatz)
VALUES
(2000, 1' at line 2
Without the Memo-Field Update is successfull.
Any idea, i tried all workarounds mentioned in this forum.
TMemoField update
-
Klaus Schirra
- Posts: 3
- Joined: Mon 19 Jun 2006 22:47
Best is not to use reserved words as field/table/view etc names. Have a look at http://dev.mysql.com/doc/refman/5.0/en/ ... words.html to know which ones are reserved. This will avoid you a lot of problems 