According to function declaration the second argument is float
CREATE FUNCTION Buffer(a Geometry, distance FLOAT) RETURNS Geometry external name geom."Buffer";
So, why it is not clear what type to be expected ?
Is there any way to use question marks as function arguments?

--
George Garbis


On Mon, Oct 10, 2011 at 12:11 PM, Fabian Groffen <Fabian.Groffen@cwi.nl> wrote:
On 10-10-2011 12:04:16 +0300, George Garbis wrote:
> st = con.prepareStatement("SELECT Buffer(t.g, ?) AS buffer, t.g AS point
> FROM geom AS t"); // This line throws an SQLException

All queries from your mail, and in particular this one is misuse of the
prepared statement.  The question mark is meant to be used on positions
where it is clearly known what type is to be expected, e.g.:
 SELECT x, y FROM table WHERE id = ?;

> st.setFloat(1, (float)1.0);

You better just do string manipulation here, and send that to the
server.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
MonetDB-users mailing list
MonetDB-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-users