Re: PreparedStatement.setString with null

Поиск
Список
Период
Сортировка
От Roland Walter
Тема Re: PreparedStatement.setString with null
Дата
Msg-id 415BDC35.1020801@mosaic-ag.com
обсуждение исходный текст
Ответ на PreparedStatement.setString with null  (Tim Penhey <tim@penhey.net>)
Список pgsql-jdbc
Tim Penhey schrieb:

> 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?

If you want to be portable to different databases, use the setNull() method.

--
Roland Walter
MOSAIC SOFTWARE AG
Telefon: 02225/882-411 Fax: 02225/882-201
http://www.mosaic-ag.com


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Download source code for pg74.215.jdbc3 driver
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: PreparedStatement.setString with null