# Problem with ExecuteQuery

**URL:** <https://community.thinkgeo.com/t/problem-with-executequery/1881>\
**Category:** WinForms\
**Created:** [January 12, 2012, 7:26pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881 "2012-01-12T19:26:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@Steve1](https://community.thinkgeo.com/u/Steve1)\
**Post date:** [January 12, 2012, 7:26pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/1 "2012-01-12T19:26:28Z")

</div>

&nbsp;I&nbsp;have&nbsp;a&nbsp;problem&nbsp;when&nbsp;I&nbsp;run&nbsp;execute&nbsp;query&nbsp;against&nbsp;shape&nbsp;files&nbsp;where&nbsp;it&nbsp;is&nbsp;one&nbsp;of&nbsp;a&nbsp;number&nbsp;of&nbsp;shape&nbsp;files&nbsp;with&nbsp;the&nbsp;same&nbsp;first&nbsp;8&nbsp;characters.

The&nbsp;problem&nbsp;seems&nbsp;to&nbsp;be&nbsp;that&nbsp;the&nbsp;way&nbsp;that&nbsp;the&nbsp;short&nbsp;file&nbsp;name&nbsp;is&nbsp;generated&nbsp;for&nbsp;OLE&nbsp;DB&nbsp;does&nbsp;not&nbsp;match&nbsp;with&nbsp;the&nbsp;way&nbsp;Windows&nbsp;has&nbsp;generated&nbsp;the&nbsp;short&nbsp;filename.

The&nbsp;error&nbsp;message&nbsp;I&nbsp;get&nbsp;is&nbsp;The&nbsp;Microsoft&nbsp;Jet&nbsp;database&nbsp;engine&nbsp;could&nbsp;not&nbsp;find&nbsp;the&nbsp;object&nbsp;'AI56-9~5&nbsp;'

I&nbsp;have&nbsp;attached&nbsp;a&nbsp;screenshot&nbsp;illustrating&nbsp;this:

 ![](https://community.thinkgeo.com/uploads/default/original/1X/9aba3295b11222bad88415115f0487b868ee5aff.png)

Note&nbsp;the&nbsp;last&nbsp;shape&nbsp;file.&nbsp;You&nbsp;would&nbsp;expect&nbsp;the&nbsp;short&nbsp;filename&nbsp;to&nbsp;be&nbsp;AI56-9~5&nbsp;but&nbsp;windows&nbsp;has&nbsp;mangled&nbsp;it.

Cheers

Steve

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [January 19, 2012, 2:59am UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/2 "2012-01-19T02:59:14Z")

</div>

Hi&nbsp;Steve,&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;haven’t&nbsp;met&nbsp;the&nbsp;situation&nbsp;you&nbsp;mentioned&nbsp;before,&nbsp;could&nbsp;you&nbsp;upload&nbsp;a&nbsp;really&nbsp;simple&nbsp;sample&nbsp;which&nbsp;can&nbsp;reproduce&nbsp;your&nbsp;problem&nbsp;so&nbsp;our&nbsp;developer&nbsp;can&nbsp;work&nbsp;for&nbsp;you?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Matt2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@Matt2](https://community.thinkgeo.com/u/Matt2)\
**Post date:** [March 25, 2013, 12:46pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/3 "2013-03-25T12:46:21Z")

</div>

I&nbsp;am&nbsp;having&nbsp;this&nbsp;same&nbsp;problem.&nbsp;&nbsp;Has&nbsp;this&nbsp;been&nbsp;fixed?&nbsp;  
  
  
  
To&nbsp;reproduce,&nbsp;have&nbsp;5&nbsp;shapefiles&nbsp;in&nbsp;the&nbsp;same&nbsp;directory&nbsp;where&nbsp;the&nbsp;first&nbsp;6&nbsp;characters&nbsp;in&nbsp;the&nbsp;filenames&nbsp;are&nbsp;the&nbsp;same,&nbsp;but&nbsp;such&nbsp;that&nbsp;the&nbsp;filenames&nbsp;are&nbsp;longer&nbsp;than&nbsp;8&nbsp;characters.&nbsp;&nbsp;The&nbsp;data&nbsp;in&nbsp;the&nbsp;shapefiles&nbsp;does&nbsp;not&nbsp;matter.&nbsp;  
  
  
  
For&nbsp;example,&nbsp;  
  
abcdef\_\_\_\_1.shp&nbsp;  
  
abcdef\_\_\_\_2.shp&nbsp;  
  
abcdef\_\_\_\_3.shp&nbsp;  
  
abcdef\_\_\_\_4.shp&nbsp;  
  
abcdef\_\_\_\_5.shp&nbsp;  
  
  
  
  
  
Now&nbsp;you&nbsp;will&nbsp;find&nbsp;that&nbsp;while&nbsp;the&nbsp;first&nbsp;4&nbsp;files&nbsp;can&nbsp;be&nbsp;queried&nbsp;successfully,&nbsp;the&nbsp;exception&nbsp;is&nbsp;thrown&nbsp;when&nbsp;querying&nbsp;the&nbsp;5th&nbsp;file:&nbsp;  
  
  
  
`ShapeFileFeatureSource.ExecuteQuery(String.Format("select * from [{1}]", System.IO.Path.GetFileNameWithoutExtension(ShapeFileFeatureSource.ShapePathFileName)))`

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [March 26, 2013, 2:55am UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/4 "2013-03-26T02:55:45Z")

</div>

Hi&nbsp;Matt,&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;are&nbsp;confirming&nbsp;with&nbsp;our&nbsp;development&nbsp;team&nbsp;now,&nbsp;If&nbsp;anything&nbsp;I&nbsp;get,&nbsp;I&nbsp;will&nbsp;update&nbsp;it&nbsp;here.&nbsp;Sorry&nbsp;for&nbsp;the&nbsp;inconvenience&nbsp;.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Johnny

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [March 28, 2013, 8:16pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/5 "2013-03-28T20:16:50Z")

</div>

Hi&nbsp;Matt,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;reporting&nbsp;the&nbsp;problem,&nbsp;which&nbsp;is&nbsp;proved&nbsp;to&nbsp;be&nbsp;a&nbsp;bug&nbsp;in&nbsp;Map&nbsp;Suite,&nbsp;it&nbsp;has&nbsp;been&nbsp;fixed&nbsp;now,&nbsp;can&nbsp;you&nbsp;download&nbsp;the&nbsp;lasted&nbsp;"Development"&nbsp;version&nbsp;6.0.319.0&nbsp;to&nbsp;have&nbsp;a&nbsp;try?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Johnny

---

<div class="post-metadata">

**Author:** ![Matt2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@Matt2](https://community.thinkgeo.com/u/Matt2)\
**Post date:** [April 1, 2013, 10:42am UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/6 "2013-04-01T10:42:34Z")

</div>

Thanks&nbsp;Johnny,&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;appreciate&nbsp;the&nbsp;fast&nbsp;response&nbsp;time&nbsp;on&nbsp;this.&nbsp;&nbsp;I&nbsp;have&nbsp;downloaded&nbsp;Development&nbsp;Build&nbsp;6.0.322.0&nbsp;and&nbsp;have&nbsp;verified&nbsp;that&nbsp;this&nbsp;issue&nbsp;is&nbsp;fixed.&nbsp;&nbsp;Will&nbsp;this&nbsp;be&nbsp;merged&nbsp;into&nbsp;the&nbsp;production&nbsp;build?

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [April 1, 2013, 9:00pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/7 "2013-04-01T21:00:28Z")

</div>

Hell&nbsp;Matt,&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;are&nbsp;prepare&nbsp;MapSuite&nbsp;7.0&nbsp;public&nbsp;release,&nbsp;so&nbsp;most&nbsp;time&nbsp;we&nbsp;won’t&nbsp;synchronize&nbsp;anything&nbsp;to&nbsp;release&nbsp;version(production&nbsp;build)&nbsp;for&nbsp;now,&nbsp;if&nbsp;you&nbsp;have&nbsp;some&nbsp;special&nbsp;requirements&nbsp;for&nbsp;this,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Matt2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@Matt2](https://community.thinkgeo.com/u/Matt2)\
**Post date:** [April 3, 2013, 9:47am UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/8 "2013-04-03T09:47:28Z")

</div>

We&nbsp;can&nbsp;use&nbsp;the&nbsp;development&nbsp;build.&nbsp;&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;help&nbsp;on&nbsp;this!

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [April 3, 2013, 8:33pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/9 "2013-04-03T20:33:25Z")

</div>

Hello&nbsp;Matt,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;are&nbsp;welcome!&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![julieta\_h](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@julieta\_h](https://community.thinkgeo.com/u/julieta_h)\
**Post date:** [September 2, 2016, 10:04pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/10 "2016-09-02T22:04:37Z")

</div>

Hello, I have the same problem of this post. I´m using mapsuite v 8.0.0.50 and the problem occurs only in windows server 2012 R2, do you know if in that version the mentioned bug exists?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [September 5, 2016, 7:55am UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/11 "2016-09-05T07:55:47Z")

</div>

Hi Julieta,

I find a 2012 VM but hadn’t succeed reproduce that with the latest version.

So I think I need more detail description include your data names and your test code, if I missed anything I can find that from your description.

And if possible could you please have another try with our latest 9.0 in your environment?

Because the problem if we reproduce that with 8.0, our developer cannot fix that for your currently version.

Regards,

Don

---

<div class="post-metadata">

**Author:** ![julieta\_h](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@julieta\_h](https://community.thinkgeo.com/u/julieta_h)\
**Post date:** [September 5, 2016, 3:54pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/12 "2016-09-05T15:54:57Z")

</div>

Hello, we are using Windows Authentication and it seems the shape files cannot be opened, I get the error The Microsoft Jet database engine could not find the object ‘namefile’. I can´t use mapsuite 9.0 because we don´t have that license.  
Do yoy think the problem could be related to this post ? [https://support.microsoft.com/en-us/kb/209685](https://support.microsoft.com/en-us/kb/209685)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [September 6, 2016, 7:54am UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/13 "2016-09-06T07:54:36Z")

</div>

Hi Julieta,

From the symptoms description, it looks that’s the same problem like yours.

From this link, it looks microsoft think the solution is rename your file.

But I want to double check with you, have you tried to reproduce it in other OS like win7 win8 or win10. And have you tried to reduce the file number, then find which file make this exception is thrown, and only rename this file to see whether it can be solved.

If rename files cannot be used for your scenario, we need more information to reproduce that first, and research whether we can solve that from our product.

Regards,

Don

---

<div class="post-metadata">

**Author:** ![julieta\_h](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@julieta\_h](https://community.thinkgeo.com/u/julieta_h)\
**Post date:** [September 8, 2016, 3:14pm UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/14 "2016-09-08T15:14:12Z")

</div>

Hello Don, we have used the program “ProcessMonitor”, that program is provided by microsoft. With that program we notice that the file name is truncated, by example if file name is “configestilos” the exception is thrown because its trying to open “configes.dbf” and the exception shows that “the file not exists”.

We reproduced the same with win7, win8 and server 2012 R2, but only with server 2012 R2 the exception is thrown. I reduced the lenght of filename to 8, and that solve the problem.

I´m worried about this post because other programmers said that the lenght of shape files must be 8, we need to use file names with more than 8. I´d like to know if the problem is for executequery only or for other type of queries, I mean those related with featuresource, like QueryTools.GetFeaturesByColumnValue or other similar ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [September 18, 2016, 3:29am UTC](https://community.thinkgeo.com/t/problem-with-executequery/1881/15 "2016-09-18T03:29:14Z")

</div>

Hi Julieta,

That’s different, the Executequery is implemented by OLEDB, so the limitation is related with system. The other query is implemented by managed code.

I think you can did a quickly test about it on 2012 R2.

Wish that’s helpful.

Regards,

Don
