Page 1 of 1

TZUpdateSQL do not use my quoted SQL String

Posted: 13.10.2010, 15:05
by mmvisual
Hello, I need your help, please

I have insert this InserSQL:
[font=Courier New]
INSERT INTO `projektpos`
(`ID`, `Projekt_ID`, `Bauteil_ID`, `BauteilLager_ID`, `Bezeichnung`,
`Bemerkung`, `Symbol`, `Wert`, `Case`, `Menge`, `Kennz`, `Variante`,
`PosX`, `PosY`, `Top`, `SMD`, `AendDatum`)
VALUES
(:ID, :Projekt_ID, :Bauteil_ID, :BauteilLager_ID, :Bezeichnung,
:Bemerkung,
:Symbol, :Wert, :Case, :Menge, :Kennz, :Variante, :PosX, :PosY, :Top,
:SMD, :AendDatum)[/font]

When the Dataset is posting, then comes this Error:
[font=Courier New]SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Case, Menge, Kennz, Variante, PosX, PosY, Top, SMD, AendDatum) VALUES (6, NULL, ' at line 1[/font]

The problem:
I have a column with the name "CASE". And the SQL must be quoted. Without this character it does not work.
Can you help me, please?

I need a Update Object, then the table is with Joins.

Or what can I do else?
I have looking in the code, but I have not find out where is the mistake.

Best regards Markus.

Posted: 13.10.2010, 19:51
by guidoaerts
rename the parameter :Case to something else ?
Guido

Posted: 14.10.2010, 06:23
by mmvisual
No, that do not help.
Markus

Posted: 07.11.2010, 21:25
by mdaems
Markus,

Sorry for the late answer.
Can you please help me to some information on this?
- Can you confirm the mysql backquotes are effectively present in the insertsql property of UpdateSQL?
- Did you add a TZSQLMonitor to your project to check what sql is sent to the server exactly? If not, please do so and verify if the backquotes are gone there.

I ask because it seems very strange that zeoslib strips these symbols, so we need some proof of that.
If the checks above give this proof, please debug the TZUpdateSQL.PostUpdates procedure to see what version of the Updatesql is available at that point.

Mark