[fpc-pascal] Why TSqlScript has no parameters?

Michael Van Canneyt michael at freepascal.org
Mon Oct 10 19:30:08 CEST 2022


Hello,


>
> I need to execute more than one statement.
> TSqlQuery it seems to accept multiple statements but then it gives a strange 
> error (posgtresql error "no parameter $2", the parameter it refers to is 
> defined and used in  the second statement).

Multiple statements are not supported in TSQLQuery.
if it works for some statements, it purely is by accident.

> So I tried a TSQlScript but then I could find no way to pass parameters.
> I'm used to the zeos components and its TZSQLProcessor (rough equivalent of 
> TSqlScript) has parameters just like a query.

This feature is missing in TSQLScript, because I never needed it, but it
should be easy enough to add.

Michael.


More information about the fpc-pascal mailing list