TZUpdateSQL do not use my quoted SQL String

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

TZUpdateSQL do not use my quoted SQL String

Post 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.
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

rename the parameter :Case to something else ?
Guido
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

No, that do not help.
Markus
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Post Reply