[mapguide-users] querying from sql server 2008

anand anand.speck at gmail.com
Mon Jul 25 02:14:25 EDT 2011


hi,
I'm using mapguide Opensource 2.1. I used to zoom multiple parcels by
querying from shape (shp) files, but now i need to query it from sql server
database. I don't have any idea on that. can anybody help me out!.

The code I've used in querying for shape files is below:

 Dim nameQuery As MgFeatureQueryOptions = New MgFeatureQueryOptions()
                Dim val As String = giscolumn
                Dim queryval As String = Session("parcelid")
                Dim totquery As String = val & "=" & "'" & queryval & "'"
                nameQuery.SetFilter(totquery)
                
                Dim map As MgMap = New MgMap(siteConnection)
                map.Open(oramap)
                
                Dim layer As MgLayer =
map.GetLayers().GetItem(propertylayer)
                Dim layerfeatures As MgFeatureReader =
layer.SelectFeatures(nameQuery)

when i use the above code nothing happens..

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/querying-from-sql-server-2008-tp6617266p6617266.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list