Ignore question marks (?) in comments in SQL (delphi)

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 19.05.2008, 14:05

Ignore question marks (?) in comments in SQL (delphi)

Postby gmb » 30.04.2018, 13:46

Hi all,

I hope these is a simple solution. Online searches was not able to assist me in solving this. Using Delphi XE5, Zeos 7.1.4 with PostgreSQL.

We are loading a library of scripts (compiled as resources) at runtime and executing the SQL.
Recently we started to encounter syntax errors and after some investigation I found these were caused by question marks in die SQL being interpreted as parameter placeholders. These question marks were added as part of comment strings in the SQL scripts.
In the past we encountered a similar issue, but were able to bypass it by setting ZQuery.Paramcheck := False;
Unfortunately, it seems as if this property is not checked where the '?' text is tested for. (I looked at code in procedure TZPostgreSQLCAPIPreparedStatement.Prepare in unit ZDbcPostgreSqlStatement.pas)

Is there any way to get what I want by setting other properties / parameters?
P.S I never use parameters in prepared statement - one can assume zquery.paramcheck will ALWAYS be false.


G Bouwer

Gold Boarder
Gold Boarder
Posts: 673
Joined: 17.01.2011, 14:17

Re: Ignore question marks (?) in comments in SQL (delphi)

Postby marsupilami » 08.05.2018, 10:00

Hello gmb,

it seems, we tried to test for your issue but it seems we cannot find it. Could you plaes provide a small sample application and maybe a scrip for an example database?

Best regards,


Return to “ZeosLib 7.1 stable Forum”

Who is online

Users browsing this forum: No registered users and 0 guests