[mapguide-users] Set Filter In operator

padmini godavarthi godavarthi.padmini at gmail.com
Thu Apr 30 01:44:55 EDT 2009



Hi,
iam using mapguide opensource 2.0 (with .net 2.0 +IIS 5.1)
Now my problem is "In" operator is not working in Setfilter option


My code is as follows..................................


     Dim queryoptions As MgFeatureQueryOptions = New MgFeatureQueryOptions()
        queryoptions.AddFeatureProperty("LINK_ID")
        queryoptions.SetFilter("LINK_ID IN (170,143,150)")
        Dim increment1 As Double = IIf((5 > 1), 1.0 / (5 - 1), 1.0)
        Dim str As String = layer.GetFeatureClassName()

        Dim dataReader1 As MgFeatureReader =
featureService.SelectFeatures(resId, layer.GetFeatureClassName(),
queryoptions)
        While dataReader1.ReadNext()
            value = GetFeaturePropertyValue(dataReader1, "LINK_ID")
            filterText = """ + "LINK_ID" + "" = "
            filterText = filterText + value
            areaRuleXML = String.Format(areaRuleTemplate, "LINK_ID" + ":" +
value, filterText, InterpolateColor(portion, "00FF00", "00FF00", 0),
InterpolateColor(portion, "00FF00", "00FF00", 0))
            areaDoc = New XmlDocument()
            areaDoc.LoadXml(areaRuleXML)
            areaNode = doc.ImportNode(areaDoc.DocumentElement, True)
            areaTypeStyle.AppendChild(areaNode)
            portion = portion + increment1
        End While
        dataReader1.Close()
       



It gives me the following error 


    Dim dataReader1 As MgFeatureReader =
featureService.SelectFeatures(resId, layer.GetFeatureClassName(),
queryoptions)
 
as 

An exception occurred in FDO component.
ORA-00907: missing right parenthesis

In this case Link ID  is  integer values not a string
value......................................:-(

can u plz tell me the solution  

i have also tried as


   queryoptions.SetFilter("LINK_ID IN ({170},{143},{150})") but it gave me
the error as "not a valid filter"


Can anyone plz tell me the solution???????????????????/


plzzzzzzzzzzzzzzzz

Regards,
Padmini.

-- 
View this message in context: http://n2.nabble.com/Set-Filter-In-operator-tp2745314p2745314.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list