Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WSLbL-0002Gn-FG for pgsql-jdbc@arkaria.postgresql.org; Tue, 25 Mar 2014 07:16:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WSLbK-0002vS-Rq for pgsql-jdbc@arkaria.postgresql.org; Tue, 25 Mar 2014 07:16:46 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WSKc6-00033M-Lq for pgsql-jdbc@postgresql.org; Tue, 25 Mar 2014 06:13:30 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WSKc3-0007Lk-Ra for pgsql-jdbc@postgresql.org; Tue, 25 Mar 2014 06:13:29 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WSKc3-0003Xo-Nu for pgsql-jdbc@postgresql.org; Mon, 24 Mar 2014 23:13:27 -0700 Date: Mon, 24 Mar 2014 23:13:27 -0700 (PDT) From: Sivakumar To: pgsql-jdbc@postgresql.org Message-ID: <1395728007716-5797354.post@n5.nabble.com> In-Reply-To: <26b8239e-b98b-4edf-ad07-28dd9063ddd7@m37g2000yqc.googlegroups.com> References: <71a63038-181d-46ea-9af6-4231d8c279a4@o15g2000vbe.googlegroups.com> <132b310f-65ae-494f-a2bb-e314c1b6c7c5@n12g2000yqh.googlegroups.com> <26b8239e-b98b-4edf-ad07-28dd9063ddd7@m37g2000yqc.googlegroups.com> Subject: Re: Prepared statement with function as argument: how to bind values? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_518467_20621644.1395728007726" X-Pg-Spam-Score: 3.7 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org ------=_Part_518467_20621644.1395728007726 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I think it's too late to respond for this issue, but i hope it will be useful for someone else. I also faced the same issue of binding, how i solved isString sql = "INSERT INTOpoi(geom,latitude,longitude,description,comment) VALUES(*ST_GeomFromText(?, 4326)*, ?, ?, ?, ?)";stmt = conn.prepareStatement(sql);*stmt.setString(1, "POINT(" +lon + " " + lat + ")");*stmt.setFloat(2, lon);stmt.setFloat(3, lat);stmt.setTimestamp(4, descr);stmt.setString(5, comment); Thanks,Sivakumar -- View this message in context: http://postgresql.1045698.n5.nabble.com/Prepared-statement-with-function-as-argument-how-to-bind-values-tp4833351p5797354.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com. ------=_Part_518467_20621644.1395728007726 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit I think it's too late to respond for this issue, but i hope it will be useful for someone else. I also faced the same issue of binding, how i solved is String sql = "INSERT INTO poi(geom,latitude,longitude,description,comment) VALUES (ST_GeomFromText(?, 4326), ?, ?, ?, ?)"; stmt = conn.prepareStatement(sql); stmt.setString(1, "POINT(" +lon + " " + lat + ")"); stmt.setFloat(2, lon); stmt.setFloat(3, lat); stmt.setTimestamp(4, descr); stmt.setString(5, comment); Thanks, Sivakumar

View this message in context: Re: Prepared statement with function as argument: how to bind values?
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
------=_Part_518467_20621644.1395728007726--