[fpc-pascal] Sqldb - How to pass an array of values as a param to be used with SQL IN operator?

Tony Caduto tony.caduto at gmail.com
Sun Apr 10 16:01:03 CEST 2016


Did you try putting quotes around the param ID in the sql query?
in(":myparam")
I am guessing it's the commas that are the problem.

Sqlite will accept double qoutes as will MySQL postgres will not though.
On Apr 10, 2016 7:40 AM, "leledumbo" <leledumbo_cool at yahoo.co.id> wrote:

> > But until now i havent figured a way to pass an array of values (mostly
> integers) to be used with IN operators.
>
> That, unfortunately, is not possible. It's a DBMS limitation, parameterized
> values are actually passed as is to DBMS. So there's nothing you can do
> unless you can convince DBMS maintainer to implement it.
>
> > Is there a way to accomplish this?
>
> No other way than direct formatting for now.
>
>
>
>
> --
> View this message in context:
> http://free-pascal-general.1045716.n5.nabble.com/Sqldb-How-to-pass-an-array-of-values-as-a-param-to-be-used-with-SQL-IN-operator-tp5724873p5724874.html
> Sent from the Free Pascal - General mailing list archive at Nabble.com.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160410/d37d0ea8/attachment.html>


More information about the fpc-pascal mailing list