Hi,
I have a Shapefile layer that I want to query a value from.
Dim
CntyLayer As New ShapeFileFeatureLayer(MAPLayersPath + "\" + COUNTYBORDER_LayerFile)
Thanks , Madduri
CntyLayer.Open()
Dim layerName = System.IO.Path.GetFileNameWithoutExtension(COUNTYBORDER_LayerFile)Dim CntyName = CntyLayer.QueryTools.ExecuteScalar("SELECT " & CountyName & " FROM " & layerName & " WHERE " & CountyCode & "=" & RoadwayCounty)
CntyLayer.Close()
I keep getting the following error:
The Microsoft Jet database engine could not find the object 'County_Boundary'. Make sure the object exists and that you spell its name and the path name correctly.
The sql query evaluates to:
"SELECT CNTY_NAME FROM County_Boundary WHERE CNTY_CODE=1"
I have checked that the dbf file and shp files exist in the path. Also the layer appears correctly on the map. What am I doing wrong here?