[postgis-users] Getting geometry into ADO
Val Macduff
val.macduff at intragis.com.au
Wed May 17 23:06:55 PDT 2006
For the benefit of anyone else trying to solve this problem, I had to do two
things to get everything working.
1. Switch to the latest version of the POSTGRESQL35W ODBC driver from
http://www.geocities.jp/inocchichichi/psqlodbc/index.html
2. Add the C7=1 parameter to the ADO connection string.
Many thanks to Hiroshi Inoue for his help.
Val
-----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 2: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
More information about the postgis-users
mailing list