Thanks for your help, James ane Yale You are so nice. :)
I think it have error by the length of filename. Now, I modify all my filename doesn’t too more characters. it can work correctly. but I’m not sure it is real answer. bucause i divided many shp files and named it about 9 characters. (some filename can work correctly, but some can’t)
I think it is temporary solve method. if you have other answer please tell me, thank you. :)
The file name is too long (greater than 8 characters, it will cause problem when doing the sql query), I have found this problem long time ago when dealing with some tickets, but I cannot remember who he is now.
If you have any more questions just feel free to let me know.
I find a probelm. if my filepath contain chinese word, it seems cause error.
the code as follows: varADR="C:\圖" Dim road_Layer As ShapeFileFeatureLayer = New ShapeFileFeatureLayer(varADR & “road.shp”) cross_SQL = “select distinct ADR from road where tnode=’” & nodeid & “’ or fnode=’” & nodeid & “’” road_Layer.Open() road_DT = road_Layer.QueryTools.ExecuteQuery(cross_SQL) road_Layer.Close()
It’s a bug for ExecuteQuery when your folder is Chinese character. We have will plan to fix this bug before next release.
But the user can write a custom ShapeFileFeatureLayer to solve her problem by herself. And you’d better add “[]” on your table name, such as select * from [road].
I have attached the sample code that shows how to extend our ShapeFileFeatureLayer.