[postgis-users] Re: JDBC PreparedStatements and inserting geometries...

Corey Puffalt cplists at gmail.com
Mon Feb 28 07:46:07 PST 2005


On Sat, 26 Feb 2005 09:35:49 +0100, Markus Schaber
<schabios at logi-track.com> wrote:
> > insertStmt.setObject(3, "'MULTILINESTRING ((" + geometry + "))'");
> 
> You should really use setString() here, so the PGJDBC driver knows that
> you insert text. This also avoids using text(). Current jdbc drivers
> have deprecated the untyped setObject(id, obj) calls.
> 

I tried changing it to insertStmt.setString() as you suggested but
postgres still complains that it's 'character varying' instead of
text...

Corey



More information about the postgis-users mailing list