# Can't we delete feature using ExecuteNonQuery method in QueryTools

**URL:** <https://community.thinkgeo.com/t/cant-we-delete-feature-using-executenonquery-method-in-querytools/9259>\
**Category:** ThinkGeo General Questions\
**Created:** [August 23, 2018, 8:37am UTC](https://community.thinkgeo.com/t/cant-we-delete-feature-using-executenonquery-method-in-querytools/9259 "2018-08-23T08:37:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![satishchandra\_noogur](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/a5b964/32.png) [@satishchandra\_noogur](https://community.thinkgeo.com/u/satishchandra_noogur)\
**Post date:** [August 23, 2018, 8:37am UTC](https://community.thinkgeo.com/t/cant-we-delete-feature-using-executenonquery-method-in-querytools/9259/1 "2018-08-23T08:37:30Z")

</div>

When I tried to delete feature its showing “The SQL Query mode is not supported.”

int result = \_crudLayer.QueryTools.ExecuteNonQuery("delete \* from table Name where "); //The SQL Query mode is not supported.

Can’t we delete feature using ExecuteNonQuery method rather than editing tools ? i.e.,

myFeatureLayer.EditTools.BeginTransaction();  
myFeatureLayer.EditTools.Delete(myFeature.Id);  
myFeatureLayer.EditTools.CommitTransaction();

---

<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:** [August 23, 2018, 9:00am UTC](https://community.thinkgeo.com/t/cant-we-delete-feature-using-executenonquery-method-in-querytools/9259/2 "2018-08-23T09:00:40Z")

</div>

Hi,

Our QueryTools for shape file is supported via OLEDB, I think Delete via ExecuteNonQuery is not supported.

You can delete it just like your code shows by the Delete API.

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![satishchandra\_noogur](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/a5b964/32.png) [@satishchandra\_noogur](https://community.thinkgeo.com/u/satishchandra_noogur)\
**Post date:** [August 23, 2018, 9:02am UTC](https://community.thinkgeo.com/t/cant-we-delete-feature-using-executenonquery-method-in-querytools/9259/3 "2018-08-23T09:02:42Z")

</div>

OK, Thank you …

---

<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:** [August 23, 2018, 9:42am UTC](https://community.thinkgeo.com/t/cant-we-delete-feature-using-executenonquery-method-in-querytools/9259/4 "2018-08-23T09:42:29Z")

</div>

Hi,

Thanks for your update.

Regards,

Ethan
