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

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

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

Post by gmb »

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.

Regards

G Bouwer
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

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

Post by marsupilami »

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,

Jan
Post Reply