Me again,
I am trying to access a SpatialWare SQL Server table from MapX. I am
getting an error "1011, Unable to Access Dataset". Any idea what I am doing
wrong here?
Here is my code sample:
Dim lInfo As Object
Dim SQL As String
Form1.Show
Set lInfo = CreateObject("mapx.layerinfo.4")
lInfo.Type = 4 ' layer type is RDB
lInfo.AddParameter "NAME", "Sites" ' layer name
lInfo.AddParameter "TOOLKIT", "ODBC"
lInfo.AddParameter "CONNECTSTRING", "DSN=SpatialTest"
SQL = "exec sp_spatial_query " & _
"'select List, Site_Name, sw_member, sw_geometry,
HG_GetString(sw_geometry) as geometry " & _
" from bay where ST_Overlaps(sw_geometry, " & _
" ST_Spatial(''ST_POLYGON(HG_CIRCLE(-2258114.47,1908249.11, 1600
))''" & _
"))'"
'SQL = "exec sp_spatial_query 'Select * from bay'"
lInfo.AddParameter "QUERY", SQL
lInfo.AddParameter "CACHE", "ON"
lInfo.AddParameter "MBRSEARCH", "ON"
Map1.Layers.Add lInfo
Set lInfo = Nothing
Thanks,
Brad Mathews
CTO, Cypress Technology Solutions, Inc.
www.CypressSolutions.com
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]