ThinkGeo.com    |     Documentation    |     Premium Support

InMemomeryFeaturelayer ExecuteQuery exception

Hi,
While executing sql query on ‘InMemomeryFeaturelayer’ layer. I am getting following error.

“Executing sql queries is not supported and the user should always check the CanExecuteSqlQueries to ensure the FeatureSource support it before calling.”

code
if (wfMap.FindFeatureLayer(“AircraftsLayer”) != null)
{
wfMap.FindFeatureLayer(“AircraftsLayer”).Open();
if (wfMap.FindFeatureLayer(“AircraftsLayer”).QueryTools.CanExecuteSqlQuery)
{
DataTable dataTable = wfMap.FindFeatureLayer(“AircraftsLayer”).QueryTools.ExecuteQuery(“SELECT * FROM AircraftsLayer”);
}
wfMap.FindFeatureLayer(“AircraftsLayer”).Close();
}

Is it possible to execute sql query in '‘InMemomeryFeaturelayer’ layer or not.
I want to filter the features basing on ‘sql query’ using '‘InMemomeryFeaturelayer’ layer.

Please suggest me any solution ASAP.

Thanks,
Riyaz

Hi Riyaz,

That should be a bug for InMemoryFeatureLayer, we will fix that to make the CanExecuteSqlQuery return false.

If you still need to query on InMemoryFeatureLayer, I think the solution should be to build a function for loop all items and get the result you want. If you have any further requirement for that, please let us know.

Regards,

Don

Hi Don,
Thanks for your quick reply.

Got it. Helpful

Thanks,
Riyaz

Hi Riyaz,

I am glad to hear that’s helpful.

Regards,

Don

Hi Don,
Is this bug resolved in latest versions(9.0.0.763) or not?

THANKS,
Riyaz

Hi Riyaz,

You can get this fix in our V10, the V9 release version had stopped to get update.

Regards,

Don

Hi Ethan,
Any updates in V9 about this point.

Thanks,
Riyaz

Hi Riyaz,

Just like my previous reply, we won’t release new V9 version, have you tried to upgrade to our latest V10?

Regards,

Ethan

Hi Ethan,
I want same functionality in V9.
Thanks,
Riyaz

Hi Riyaz,

We double check the fix, and our managers discuss about it, we decided to move this fix back to V9 this time.

We strongly recommend upgrade your package to V10, because we only fix bug in V10 now and won’t move them back to V9.

Please wait our update version 9.0.0.907 or 9.0.907.0, which will contains this fix.

Regards,

Ethan