X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 733C69DC859 for ; Mon, 20 Feb 2006 13:42:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45059-07 for ; Mon, 20 Feb 2006 13:42:18 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id D500D9DCA4D for ; Mon, 20 Feb 2006 13:42:16 -0400 (AST) Received: (qmail 11897 invoked by uid 1112); 20 Feb 2006 17:42:16 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Feb 2006 17:42:16 -0000 Date: Mon, 20 Feb 2006 12:42:16 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: David Goodenough cc: pgsql-jdbc@postgresql.org Subject: Re: setString and timestamps In-Reply-To: <200602201431.55800.david.goodenough@btconnect.com> Message-ID: References: <200602171607.18071.david.goodenough@btconnect.com> <200602201431.55800.david.goodenough@btconnect.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200602/152 X-Sequence-Number: 14749 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