ThinkGeo.com    |     Documentation    |     Premium Support

About split original shp file problem

Hello,


I have ever asked  problem about split original shp file.


But now, it happen some strange problems.


When I split original shp file to other files.


it sometimes happen error as follows:


1. the number of dbf records are not correct


2. when i used divided shp files to execute sql , it happen error.  (i use Map Suite Explorer to test divided shp files)


3. when i moved the file to other path to test it, it happen error, too. (it is so strange...it doesn't happen every time, but it cause some troubles)


Could you tell me how to avoid these situation?



Carol, 
  
 Thanks for your post and question. 
  
 I suspect the result spitted data has some problem, could you sent us the data to recreate the problem? 
  
 Any more information would be helpful. 
  
 Thanks. 
  
 Yale 


Thanks for your reply, Yale 
 I have upload data to Customer Portal.

Carol, 
  
 Welcome, please asked for to send it to Yale. 
  
 Any more questions just feel free to let me know. 
  
 Thanks. 
  
 Yale

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. :) 
  
  


Carol, 
  
 Thanks for your letting us know your status. 
  
 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. 
  
 Thanks. 
  
 Yale 


Yale, 
  
 I find a probelm. 
 if my filepath contain chinese word, it seems cause error. 
  
 the code as follows: 
 varADR="C:\圖&#34
 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() 
  


 


Carol,
 
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.
 
Please let me know if you have more questions
 
Thanks
 
James

1552-ExecuteQuerySample.zip (12 KB)