Select to view content in your preferred language

GeoProcessor  WhereClause failure .NET

667
1
10-05-2010 12:27 PM
NathanAmboy
Deactivated User
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)
0 Kudos
1 Reply
NathanAmboy
Deactivated User
in the words of "Emily Litella" ---- Never Mind.   I was not re-setting the myCalc.In_table to the newly created table_view !!!  It was calculating on the old table.
0 Kudos