namboy

GeoProcessor  WhereClause failure .NET

Discussion created by namboy on Oct 5, 2010
Latest reply on Oct 5, 2010 by namboy
I'm not getting the syntax - ie. quotes - right, thus all records are calculated to 0.  How do we quoted the table item names in .NET?

Dim gp As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor

            'Apply Query to set MIN_SYSTEM = 3
            Dim tblView As MakeTableView = New MakeTableView
            tblView.in_table = sPath & "\" & geoName & "\" & "Roads"
            tblView.out_view = "Road_view"
            gp.Execute(tblView, Nothing)

            Dim Sel As SelectLayerByAttribute = New SelectLayerByAttribute
            Sel.in_layer_or_view = "Road_view"
            Sel.selection_type = "NEW_SELECTION"
            Dim Query As String = "OPER_MAINT_LEVEL IS NULL"
            Sel.where_clause = (Query)
            gp.Execute(Sel, Nothing)
            myCalc.field = "OPER_MAINT_LEVEL"
            myCalc.expression = 0
            gp.Execute(myCalc, Nothing)

Outcomes