pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Silvio Bierman <sbierman@jambo-software.com>
Cc: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: PreparedStatement#setString on non-string parameters
Date: Tue, 08 Mar 2005 07:33:04 -0500
Message-ID: <422D9B80.6080306@fastcrypt.com> (raw)
In-Reply-To: <JGEOKLDJHLJNAPFIBKBNCEICDCAA.sbierman@jambo-software.com>
References: <JGEOKLDJHLJNAPFIBKBNCEICDCAA.sbierman@jambo-software.com>

Silvio,

I presume you are talking about setObject ??? I can't find a 
setString(non-string param)

Dave

Silvio Bierman wrote:

>Hello all,
>
>I have just finished a few hours of testing our product that already runs on
>Oracle, SQLServer, MySQL, MaxDB and McKOI on PostgreSQL. I always liked what
>I read about this database apart from the fact that it used to not run
>natively on Windows. Since many of our customers run Windows servers I never
>bothered with PostgreSQL before.
>
>However, starting with version 8 there is a native Windows version which I
>installed and ran our product on. At first everything was fine and I was
>very impressed with both the performance as the ease of use of the admin
>tools.
>
>But when I starting doing writes to the database SQL exceptions started to
>occur. They where all over the application code but where all the same
>error: doing a setString on a numeric parameter. I know this is usually
>suboptimal but since we handle a lot of XML data throughout the (heavily
>distributed) application many numeric values are available as Strings so it
>would be a matter of converting them to numeric values ourselves or letting
>the JDBC driver do that.
>
>The JDBC drivers we used for the other databasse I mentioned never
>complained. Unfortunately PostgreSQL does. I read somewhere that using the
>pre-version-8 JDBC driver will work with 8 and not show this behaviour, the
>8 driver has deliberately changed the behaviour.
>
>The JDBC spec requires the driver to attempt a conversion when a
>setString is done on a non-string parameter. This will break a lot of
>conformant code, not only ours. Is there any chance this can be corrected?
>
>Regards,
>
>Silvio Bierman
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>
>
>  
>

-- 
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561




view thread (14+ messages)  latest in thread

Message-ID: <422D9B80.6080306@fastcrypt.com>
Permalink:  ../422D9B80.6080306@fastcrypt.com/
Also on:    postgresql.org/message-id/422D9B80.6080306@fastcrypt.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: pg@fastcrypt.com, sbierman@jambo-software.com
  Subject: Re: PreparedStatement#setString on non-string parameters
  In-Reply-To: <422D9B80.6080306@fastcrypt.com>
  References: <JGEOKLDJHLJNAPFIBKBNCEICDCAA.sbierman@jambo-software.com> <422D9B80.6080306@fastcrypt.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