Re: Pass column name in preparedstatement - Mailing list pgsql-jdbc

From Antony Paul
Subject Re: Pass column name in preparedstatement
Date
Msg-id 2989532e05021504045fc879fe@mail.gmail.com
Whole thread Raw
In response to Re: Pass column name in preparedstatement  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Pass column name in preparedstatement
Re: Pass column name in preparedstatement
List pgsql-jdbc
In 7.3.3 is there any use in using PreparedStatement since the columns
may change for each query.

rgds
Antony Paul


On Wed, 16 Feb 2005 00:54:09 +1300, Oliver Jowett <oliver@opencloud.com> wrote:
> Antony Paul wrote:
> > Hi all,
> >     Is it possible to pass column name to a PreparedStatement as a
> > parameter.
>
> No, you can only use parameter placeholders in places which the backend
> grammar allows parameters (namely, in expressions). Column names aren't
> one of those places.
>
> > Or should I use Statement.
>
> You can use either Statement or PreparedStatement so long as you insert
> the column name into the SQL query string yourself before giving it to
> the driver.
>
> -O
>

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Pass column name in preparedstatement
Next
From: Thomas Hallgren
Date:
Subject: Re: Pass column name in preparedstatement