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
Ignore question marks (?) in comments in SQL (delphi)
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Ignore question marks (?) in comments in SQL (delphi)
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
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