Calling Stored Procedure Error

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?


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.

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

1 Like

It is relatively new, if that helps :slight_smile:

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