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 0799C9DC987 for ; Mon, 9 Jan 2006 23:24:35 -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 87882-09 for ; Mon, 9 Jan 2006 23:24:39 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199]) by postgresql.org (Postfix) with ESMTP id C8FD59DC9BE for ; Mon, 9 Jan 2006 23:24:32 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 34so3979619nzf for ; Mon, 09 Jan 2006 19:24:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=sp9aNhDjNEkxIzzfC3rOrECVvvKd+LhE0gmAjz15peGYyTX4HGFPc2cmDQT6Uipaz8WLSerOq4D2DcsKxc541beLT+Qx9WJRg9N3AA0qVMWiFD6tBwzJWCZw/xPtyHKyMkDy3VXeMofQNPC+q5PGsptc5QiVG01JqOPGYxzuyDk= Received: by 10.65.177.14 with SMTP id e14mr6759826qbp; Mon, 09 Jan 2006 19:24:37 -0800 (PST) Received: by 10.65.95.1 with HTTP; Mon, 9 Jan 2006 19:24:37 -0800 (PST) Message-ID: <4bd3e1480601091924q54cfee5cs1c6744638e650fff@mail.gmail.com> Date: Mon, 9 Jan 2006 20:24:37 -0700 From: Assad Jarrahian To: pgsql-jdbc@postgresql.org Subject: Prepared statements and default values MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.126 required=5 tests=[AWL=0.126] X-Spam-Score: 0.126 X-Spam-Level: X-Archive-Number: 200601/34 X-Sequence-Number: 14485 I have a preparedStatement with the following query "UPDATE usersettings SET gpsfrequency =3D ? , serverurl =3D ? where username =3D ? ;"; In the db, the table userSettings has a default value specified for gps_frequency . So when I write code if (client.getSettings().getField(Settings.GPS_FREQUENCY).compareTo(""))=3D= =3D0) =09 //pick up the default value from the db. else=09 =09setUserSettings.setInt(++i, Integer.parseInt(client.getSettings().getField(Settings.GPS_FREQUENCY))); =09=09=09 .. I basically want to send something that lets the db know to use the DEFAULT value. (its of type int0) So what does go here? any help would be much appreciated. -a