ThinkGeo.com    |     Documentation    |     Premium Support

ExecuteQuery Issue

Hi,
I generated ‘ATSPoints’ Shape file with Point Features.
While querying features from shape file, I am getting ‘OleDbException’.

Code:
ShapeFileFeatureLayer shpATSPoints = new ShapeFileFeatureLayer(Application.StartupPath + @"\MapData\ShapeFiles\GeneratedShapeFiles\ATSPoints.shp");
shpATSPoints.Open();
DataTable dataTable1 = shpATSPoints.QueryTools.ExecuteQuery(“Select * from ATSPoints”);
shpATSPoints.Close();

Error Message :
“The Microsoft Jet database engine could not find the object ‘ATSPoints’. Make sure the object exists and that you spell its name and the path name correctly.”

Please check and clear this issue.

Note : I tried to upload my ‘ATSPoints’ shape files. But limit exceeds more than 3MB.
So I am attaching only ‘ATSPoints.dbf’ file.
ATSPoints.zip (1.8 MB)

Thanks,
Riyaz

Hi Riyaz,

Please try changing the application’s Platform target to x86 and have a try again. If it still does not work, please append your shapefile here.

Thanks,
Peter

Hi Peter,

My application’s target platform is set to x86 by default.

Here I am attaching my ‘ATSPoints’ shape file.

ATSPoints.zip (53.2 KB)

Please suggest me some other solution.

Thank you,
Riyaz

Hi Riyaz,

I was unable to recreate this issue, it works well as showing below.

Test Environment:

Version: Both 9.0.0.541 and 9.0.541.0
OS: Win8.1

Thanks,
Peter

Hi Peter,
I have a doubt. Using ‘Execute Query’ method for querying, is there any dependency for executing ‘Execute Query’ method.
I mean ‘ODBC driver’ or something else. Main problem is that, at developing side ‘Execute Query’ method working fine.
Where as at Client side having some issues for getting desired result using ‘Execute Query’ method.

Points

  1. Dependency
  2. Performance improve
  3. OleDBException

Please let me know, clear concept of ‘Execute Query’ method.

Thanks,
Riyaz

Hi Riyaz,

Do you make sure the code and database is totally the same? Because from the exception it looks the “From” clause don’t works, this clause should point to target dbf file.

The oledb should related with OS, so if the target OS or language is different, maybe it cannot works well.

Maybe you want to check the environment and use some utility to check whether your query statement can works well in target machine.

Regards,

Don