# About split original shp file problem

**URL:** <https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908>\
**Category:** WinForms\
**Created:** [December 8, 2009, 2:41am UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908 "2009-12-08T02:41:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carol](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@Carol](https://community.thinkgeo.com/u/Carol)\
**Post date:** [December 8, 2009, 2:41am UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/1 "2009-12-08T02:41:33Z")

</div>

Hello,

I&nbsp;have&nbsp;ever&nbsp;asked&nbsp;&nbsp;problem&nbsp;about&nbsp;split&nbsp;original&nbsp;shp&nbsp;file.

But&nbsp;now,&nbsp;it&nbsp;happen&nbsp;some&nbsp;strange&nbsp;problems.

When&nbsp;I&nbsp;split&nbsp;original&nbsp;shp&nbsp;file&nbsp;to&nbsp;other&nbsp;files.

it&nbsp;sometimes&nbsp;happen&nbsp;error&nbsp;as&nbsp;follows:

1.&nbsp;the&nbsp;number&nbsp;of&nbsp;dbf&nbsp;records&nbsp;are&nbsp;not&nbsp;correct

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

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

Could&nbsp;you&nbsp;tell&nbsp;me&nbsp;how&nbsp;to&nbsp;avoid&nbsp;these&nbsp;situation?

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [December 8, 2009, 7:03pm UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/2 "2009-12-08T19:03:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Carol](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@Carol](https://community.thinkgeo.com/u/Carol)\
**Post date:** [December 8, 2009, 8:25pm UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/3 "2009-12-08T20:25:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [December 8, 2009, 9:11pm UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/4 "2009-12-08T21:11:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Carol](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@Carol](https://community.thinkgeo.com/u/Carol)\
**Post date:** [December 9, 2009, 9:53pm UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/5 "2009-12-09T21:53:14Z")

</div>

Thanks&nbsp;for&nbsp;your&nbsp;help,&nbsp;James&nbsp;ane&nbsp;Yale&nbsp;  
&nbsp;You&nbsp;are&nbsp;so&nbsp;nice.&nbsp;:)&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;it&nbsp;have&nbsp;error&nbsp;by&nbsp;the&nbsp;length&nbsp;of&nbsp;filename.&nbsp;  
&nbsp;Now,&nbsp;I&nbsp;modify&nbsp;all&nbsp;my&nbsp;filename&nbsp;doesn’t&nbsp;too&nbsp;more&nbsp;characters.&nbsp;  
&nbsp;it&nbsp;can&nbsp;work&nbsp;correctly.&nbsp;  
&nbsp;but&nbsp;I’m&nbsp;not&nbsp;sure&nbsp;it&nbsp;is&nbsp;real&nbsp;answer.&nbsp;bucause&nbsp;i&nbsp;divided&nbsp;many&nbsp;shp&nbsp;files&nbsp;and&nbsp;named&nbsp;it&nbsp;about&nbsp;9&nbsp;characters.&nbsp;  
&nbsp;(some&nbsp;filename&nbsp;can&nbsp;work&nbsp;correctly,&nbsp;but&nbsp;some&nbsp;can’t)&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;it&nbsp;is&nbsp;temporary&nbsp;solve&nbsp;method.&nbsp;if&nbsp;you&nbsp;have&nbsp;other&nbsp;answer&nbsp;please&nbsp;tell&nbsp;me,&nbsp;thank&nbsp;you.&nbsp;:)&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [December 9, 2009, 11:08pm UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/6 "2009-12-09T23:08:10Z")

</div>

Carol,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;letting&nbsp;us&nbsp;know&nbsp;your&nbsp;status.&nbsp;  
&nbsp;&nbsp;  
&nbsp;The&nbsp;file&nbsp;name&nbsp;is&nbsp;too&nbsp;long&nbsp;(greater&nbsp;than&nbsp;8&nbsp;characters,&nbsp;it&nbsp;will&nbsp;cause&nbsp;problem&nbsp;when&nbsp;doing&nbsp;the&nbsp;sql&nbsp;query),&nbsp;I&nbsp;have&nbsp;found&nbsp;this&nbsp;problem&nbsp;long&nbsp;time&nbsp;ago&nbsp;when&nbsp;dealing&nbsp;with&nbsp;some&nbsp;tickets,&nbsp;but&nbsp;I&nbsp;cannot&nbsp;remember&nbsp;who&nbsp;he&nbsp;is&nbsp;now.&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Carol](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@Carol](https://community.thinkgeo.com/u/Carol)\
**Post date:** [December 10, 2009, 3:27am UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/7 "2009-12-10T03:27:22Z")

</div>

Yale,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;find&nbsp;a&nbsp;probelm.&nbsp;  
&nbsp;if&nbsp;my&nbsp;filepath&nbsp;contain&nbsp;chinese&nbsp;word,&nbsp;it&nbsp;seems&nbsp;cause&nbsp;error.&nbsp;  
&nbsp;&nbsp;  
&nbsp;the&nbsp;code&nbsp;as&nbsp;follows:&nbsp;  
&nbsp;varADR="C:\圖&#34;&nbsp;  
&nbsp;Dim&nbsp;road\_Layer&nbsp;As&nbsp;ShapeFileFeatureLayer&nbsp;=&nbsp;New&nbsp;ShapeFileFeatureLayer(varADR&nbsp;&&nbsp;“road.shp”)&nbsp;  
&nbsp;cross\_SQL&nbsp;=&nbsp;“select&nbsp;distinct&nbsp;ADR&nbsp;from&nbsp;road&nbsp;where&nbsp;tnode=’”&nbsp;&&nbsp;nodeid&nbsp;&&nbsp;“’&nbsp;or&nbsp;fnode=’”&nbsp;&&nbsp;nodeid&nbsp;&&nbsp;“’”&nbsp;  
&nbsp;road\_Layer.Open()&nbsp;  
&nbsp;road\_DT&nbsp;=&nbsp;road\_Layer.QueryTools.ExecuteQuery(cross\_SQL)&nbsp;  
&nbsp;road\_Layer.Close()&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [December 10, 2009, 9:44pm UTC](https://community.thinkgeo.com/t/about-split-original-shp-file-problem/908/8 "2009-12-10T21:44:56Z")

</div>

&nbsp;

Carol,  
&nbsp;  
It’s&nbsp;a&nbsp;bug&nbsp;for&nbsp;ExecuteQuery&nbsp;when&nbsp;your&nbsp;folder&nbsp;is&nbsp;Chinese&nbsp;character.&nbsp;We&nbsp;have&nbsp;will&nbsp;plan&nbsp;to&nbsp;fix&nbsp;this&nbsp;bug&nbsp;before&nbsp;next&nbsp;release.  
&nbsp;  
But&nbsp;the&nbsp;user&nbsp;can&nbsp;write&nbsp;a&nbsp;custom&nbsp;ShapeFileFeatureLayer&nbsp;to&nbsp;solve&nbsp;her&nbsp;problem&nbsp;by&nbsp;herself.&nbsp;And&nbsp;you’d&nbsp;better&nbsp;add&nbsp;“[]”&nbsp;on&nbsp;your&nbsp;table&nbsp;name,&nbsp;such&nbsp;as&nbsp;select&nbsp;\*&nbsp;from&nbsp;[road].  
&nbsp;  
I&nbsp;have&nbsp;attached&nbsp;the&nbsp;sample&nbsp;code&nbsp;that&nbsp;shows&nbsp;how&nbsp;to&nbsp;extend&nbsp;our&nbsp;ShapeFileFeatureLayer.  
&nbsp;  
Please&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;more&nbsp;questions  
&nbsp;  
Thanks  
&nbsp;  
James  
  
[1552-ExecuteQuerySample.zip](https://community.thinkgeo.com/uploads/default/original/2X/9/9c0eb3b2d1b1f7c4127fd711c710ca72a162bc30.zip) (12 KB)
