[postgis-users] Getting geometry into ADO

Val Macduff val.macduff at intragis.com.au
Mon May 15 00:08:15 PDT 2006


Thanks Alan. This was not the problem though. I have the code working now
using the PostgreSQL+ ODBC driver. All other drivers I tried gave the same
problem. I also switched to reading the blob into an ADO stream.

Val



-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of Alan
Sent: Friday, 12 May 2006 4:18 AM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] Getting geometry into ADO

Val,
I may be completely on the wrong track here (and apologise if I am) but
could the problem have something to do with inner rings and the like... ie
Collections of Collections?
Alan Keown

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Val
Macduff
Sent: Wednesday, 10 May 2006 4:51 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Getting geometry into ADO

I am building a GIS browser interface to PostGIS data using VB6 to read the
PostGIS table. I need to get the complete geometry field into a VB6 Variant
variable to pass to the TatukGIS DK to create a shape.  My select statement
is

    sSelectString = "SELECT SRID(" & msShapeItem & ") as ShapeSRID," & _
                          "AsBINARY(" & msShapeItem & ",'XDR') as SHAPEWKB"
& _
                          " FROM " & msTableName & _
                          " WHERE " & msShapeItem & " IS NOT NULL"

When I use this on a point dataset or a small line dataset everything works
fine but if I try to access polygon data with very large numbers of
coordinates I cannot retrieve a value at all. The statement

vntCoords = rs.Fields("SHAPEWKB").Value

causes an immediate untrappable error.  If I look at the locals before this
happens, the value of SHAPEWKB is given as

<Application-defined or object-defined error>

Trying to fetch the data AsText or raw also results in the same "value"
being shown.

Does anyone know how I can do this?

Thanks, Val



_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list