in(...) clause and PreparedStatement - Mailing list pgsql-jdbc

From Sergey Pariev
Subject in(...) clause and PreparedStatement
Date
Msg-id 42AD8567.10004@tnet.dp.ua
Whole thread Raw
Responses timestamp & graph time scale
Re: in(...) clause and PreparedStatement
List pgsql-jdbc
Hi all.
    It may be stupid question, but is there way to use PreparedStatement
with queries like
SELECT * FROM mytable WHERE t_id IN (1,2,3) ?
    I've googled but haven't found nothing explicitly said on this topic.
    I've tried the following
    PreparedStatement st = conn.prepareStatement("SELECT * FROM mytable
WHERE t_id IN ( ? )");
    st.setObject(1,"1,2,3");

    and get error complaining on type mismatch.

    Thanks in advance, Sergey.

pgsql-jdbc by date:

Previous
From: Giuseppe Sacco
Date:
Subject: Re: New italian translation
Next
From: Carl Olivier
Date:
Subject: Re: DatabaseMetaData and Transactions