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

Поиск
Список
Период
Сортировка
От Sivakumar
Тема Re: Prepared statement with function as argument: how to bind values?
Дата
Msg-id 1395728007716-5797354.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Prepared statement with function as argument: how to bind values?  (alexbruy <alexander.bruy@gmail.com>)
Список 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 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.

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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Prepared statement with function as argument: how to bind values?
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Postgres jdbc build broken with plain ant since e7c2c93