pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Goodenough <david.goodenough@btconnect.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: setString and timestamps
Date: Tue, 21 Feb 2006 09:55:45 +0000
Message-ID: <200602210955.45502.david.goodenough@btconnect.com> (raw)
In-Reply-To: <Pine.BSO.4.63.0602201240180.23155@leary.csoft.net>
References: <200602171607.18071.david.goodenough@btconnect.com>
	<200602201431.55800.david.goodenough@btconnect.com>
	<Pine.BSO.4.63.0602201240180.23155@leary.csoft.net>

On Monday 20 February 2006 17:42, Kris Jurka wrote:
> 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
PreparedStatement.getParameterMetaData was the one I wanted.  My copy of
Java Enterprise in a Nutshell is too old, I must get a new one.

Thank you

David



view thread (5+ messages)

Message-ID: <200602210955.45502.david.goodenough@btconnect.com>
Permalink:  ../200602210955.45502.david.goodenough@btconnect.com/
Also on:    postgresql.org/message-id/200602210955.45502.david.goodenough@btconnect.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: david.goodenough@btconnect.com
  Subject: Re: setString and timestamps
  In-Reply-To: <200602210955.45502.david.goodenough@btconnect.com>
  References: <200602171607.18071.david.goodenough@btconnect.com> <200602201431.55800.david.goodenough@btconnect.com> <Pine.BSO.4.63.0602201240180.23155@leary.csoft.net> <200602210955.45502.david.goodenough@btconnect.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox