| From: | Kris Jurka <books(at)ejurka(dot)com> |
|---|---|
| To: | David Goodenough <david(dot)goodenough(at)btconnect(dot)com> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: setString and timestamps |
| Date: | 2006-02-20 17:42:16 |
| Message-ID: | Pine.BSO.4.63.0602201240180.23155@leary.csoft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
On Mon, 20 Feb 2006, David Goodenough wrote:
> What is the best way of finding the column types in generic code. That is to
> say if I have a method with no knowledge of a specific table and I am about
> to do an insert and I wish to get the parameters in the correct format what
> APIs exist that allow me to find out the type of a named column. I have
> looked through the JDBC docs without success so far, but it may be that
> I am looking for the wrong thing. If I need to use a Postgresql only API
> that is fine.
>
DatabaseMetaData.getColumns or PreparedStatement.getParameterMetaData are
probably what you're looking for.
Kris Jurka
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kris Jurka | 2006-02-20 17:58:04 | Re: PreparedStatement clearParameters |
| Previous Message | David Goodenough | 2006-02-20 14:31:55 | Re: setString and timestamps |