# Calling Stored Procedure Error

**URL:** <https://forum.inductiveautomation.com/t/calling-stored-procedure-error/83379>\
**Category:** Ignition\
**Tags:** database, ignition81, perspective\
**Created:** [December 20, 2023, 4:07pm UTC](https://forum.inductiveautomation.com/t/calling-stored-procedure-error/83379 "2023-12-20T16:07:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Houston](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas_houston/32/68700_2.png) [@Nicholas\_Houston](https://forum.inductiveautomation.com/u/Nicholas_Houston)\
**Post date:** [December 20, 2023, 4:07pm UTC](https://forum.inductiveautomation.com/t/calling-stored-procedure-error/83379/1 "2023-12-20T16:07:53Z")

</div>

I'm trying to EXEC a stored procedure just using the Query Browser for now. I keep getting an error for the stored procedure stating 'A result set was generated for update'. I have attached images. Is this something wrong with my syntax or something that needs changed in the stored procedure?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/5778e711af1f5e535e38eb8a28e088c18a7d5301.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/07e2be7d0596bc1d55d8e4995f70e241654e7a29.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 20, 2023, 4:11pm UTC](https://forum.inductiveautomation.com/t/calling-stored-procedure-error/83379/2 "2023-12-20T16:11:45Z")

</div>

JDBC (Java's database access API) separates "update" statements from "select" statements, fundamentally - if you'll notice, the `Query Type` dropdown in your screenshot is set to "Auto (Update)" - meaning it's going to run your SQL through the JDBC "update" statement mechanism. When it does that, and your stored procedure returns multiple rows/a proper result set (rather than a changed row count or a key, as expected from an "update"), it throws the error you're getting.

Change the `Query Type` dropdown to 'Select' and this EXEC statement should go through.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Houston](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas_houston/32/68700_2.png) [@Nicholas\_Houston](https://forum.inductiveautomation.com/u/Nicholas_Houston)\
**Post date:** [December 20, 2023, 4:13pm UTC](https://forum.inductiveautomation.com/t/calling-stored-procedure-error/83379/3 "2023-12-20T16:13:02Z")

</div>

Oh my gosh, I can't believe I overlooked that drop down. Thanks Paul!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 20, 2023, 4:13pm UTC](https://forum.inductiveautomation.com/t/calling-stored-procedure-error/83379/4 "2023-12-20T16:13:49Z")

</div>

It is relatively new, if that helps 🙂

It used to be that the DB query browser relied entirely on the (very poor) autodetection.
