Re: Prepared statement with function as argument: how to bind values?

From: Sivakumar <sivaraj2205(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Prepared statement with function as argument: how to bind values?
Date: 2014-03-25 06:13:27
Message-ID: 1395728007716-5797354.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message David Johnston 2014-03-25 07:06:23 Re: Prepared statement with function as argument: how to bind values?
Previous Message Michael Paquier 2014-03-25 02:42:54 Postgres jdbc build broken with plain ant since e7c2c93