Page 1 of 1

Query Params Question

Posted: Wed 24 Dec 2008 16:31
by snorkel
is there a way to turn off param checking for a query? Reason is many times PostgreSQL queries will have stuff like this in them:
select junk::text
The PGSQL way of casting uses : which is the same as what Delphi Params use. It would be nice to have a property called ParamCheck and if set to false it does no checking for params.

Posted: Wed 24 Dec 2008 17:11
by snorkel
Sorry, I see now there is a ParamCheck property, it's just not published.
Maybe considered publishing it, so it can be set at design time?



Posted: Thu 25 Dec 2008 11:04
by Plash
When ParamCheck = False, the Params collection is not filled automatically. You should add parameters to Params manually.
But SQL statement is parsed anyway, and parameter names in the statement are replaced with $1, $2, etc.

Note 1: PgDAC does not treat ::name as a parameter. So don't worry about such type casts.

Note 2: The ParamCheck property works incorrecly in the beta version. We'll fix a bug with this this property in the next PgDAC build.
In the next build the ParamCheck property of TPgQuery will be published.