Hi all,

I am trying to use PreparedStatement to get a buffer of a geometry invoking the commands bellow

PreparedStatement st = con.prepareStatement("CREATE TABLE geom (g geometry)");
st.execute();
st = con.prepareStatement("INSERT INTO geom VALUES(GeomFromText('POINT(1 1)', 2100))");
st.execute();       
st = con.prepareStatement("SELECT Buffer(t.g, ?) AS buffer, t.g AS point FROM geom AS t"); // This line throws an SQLException
st.setFloat(1, (float)1.0);
ResultSet results = st.executeQuery();

However the fifth line throws an SQLException with this message:
types geometry(0,0) and double(53,0) are not equal

Replacing the question mark with a number (e.g. 1.0) the program executes properly.

Why is this exception thrown?
Is something wrong in my code?

Thanks in advance,
George Garbis