pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: David Goodenough <david.goodenough@btconnect.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: setString and timestamps
Date: Mon, 20 Feb 2006 12:42:16 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0602201240180.23155@leary.csoft.net> (raw)
In-Reply-To: <200602201431.55800.david.goodenough@btconnect.com>
References: <200602171607.18071.david.goodenough@btconnect.com>
	<Pine.BSO.4.63.0602171329110.20250@leary.csoft.net>
	<200602201431.55800.david.goodenough@btconnect.com>



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



view thread (5+ messages)  latest in thread

Message-ID: <Pine.BSO.4.63.0602201240180.23155@leary.csoft.net>
Permalink:  ../Pine.BSO.4.63.0602201240180.23155@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.63.0602201240180.23155@leary.csoft.net

 · 

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: books@ejurka.com, david.goodenough@btconnect.com
  Subject: Re: setString and timestamps
  In-Reply-To: <Pine.BSO.4.63.0602201240180.23155@leary.csoft.net>
  References: <200602171607.18071.david.goodenough@btconnect.com> <Pine.BSO.4.63.0602171329110.20250@leary.csoft.net> <200602201431.55800.david.goodenough@btconnect.com> <Pine.BSO.4.63.0602201240180.23155@leary.csoft.net>

* 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