From: Tim Penhey <tim@penhey.net>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: PreparedStatement.setString with null
Date: Thu, 30 Sep 2004 10:55:19 +0100
Message-ID: <415BD807.6040103@penhey.net> (raw)
What is this supposed to do?
PreparedStatement stat = connection.prepareStatement("update table1
set col1 = ?");
stat.setString(1, null);
Will this make a null value in the database or an empty string? Do we
have to use the setNull(1, Types.VARCHAR) in order to get a null value
entered?
Thanks,
Tim
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: tim@penhey.net
Subject: Re: PreparedStatement.setString with null
In-Reply-To: <415BD807.6040103@penhey.net>
References: <415BD807.6040103@penhey.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