[postgis-users] problem using JDBC PreparedStatement

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Tue Oct 10 07:42:51 PDT 2006


On Tue, 2006-10-10 at 14:28 +0200, Just van den Broecke wrote:
> Hi Mark,
> 
> Thanks. Though I think neither of your two reasons are the cause. The 
> library code that generates the PSs is used by many other apps/tables 
> and always works. For INSERT it uses exactly the same order as specified 
> in the table (using table metadata). Any column combination of INTs 
> STRING etc works (except thus for "geometry" columns)
> 
> Another example to sort of prove my point is that UPDATE fails with the 
> same error reason:
> UPDATE spatialone SET point=?, modificationdate=? WHERE id = 52
> expands to
> UPDATE spatialone SET point=GeomFromText('POINT (4.92 52.35)', 4326), 
> modificationdate=1160482168135 WHERE id = 52
> 
> (These strings come from the debugger, like java.sql.PreparedStatement 
> member field values). Like said when using a real PGgeometryLW object 
> i.s.o. a String the same code works. best,
> 
> Just


Hi Just,

In that case it may be something to do with how the JDBC layer
translates between PostgreSQL/PostGIS and native Java types.
Unfortunately I don't use Java at the moment and so can't really help
you :(


Kind regards,

Mark.





More information about the postgis-users mailing list