-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling stored procedures with output parameters #2190
Comments
What is your database? (bug with NullPointerException will be fixed in the next version). |
I am connecting to the Caché database using its JDBC driver. Everything works great: SELECT, DML, calling procedures, ER diagrams. The only thing that doesn't work is stored procedure return values, either as the return value of the procedure itself, or as OUT or INOUT parameters. So the snippet above is the only snippet that there is. I'm trying to execute this: FCE_Operations is not a table; it's a container for stored procedures only. |
You could try this:
Unfortunately I can't test this because there is no Caché server in our test environment. |
Thanks for the suggestion. Changing that preference and running as you suggested still doesn't work. I don't have to enter parameter values for the ?, but I get "Not all parameters bound/registered." I'd like to try to separate this issue from any particular database. Can you write a simple stored procedure using any DB in your environment that takes two integers and returns their sum and difference, plus an extra string, and run that? The sql would looks something like this: There should be a way for DBeaver to display the 3rd and 4th arguments and the return value of the procedure that are returned from the DB. This is not mission-critical for me, by the way. I've just seen this ability in other products. |
I am interested in revisiting this issue. Here is an example of T-SQL that exhibits the problem. It doesn't require any tables. Run this statement while connected to MS SQL Server to create the procedure.
Once created, right-click the storproc.test procedure and click Edit Procedure. You'll see a display very much like the screenshot in my original post for this issue: there's a RETURN, two INs, and two OUTs. Now right-click the procedure again and click Execute Stored Procedure. You get a SELECT statement that calls the procedure, and you can supply values for the If you try to run the procedure using CALL or EXEC, you can't get the If you download WinSQL from Synametrics, and you create and run the same procedure, you'll see the following behavior. I think DBeaver should do this also. After clicking Execute, you'll see this: |
@tati-kru @serge-rider: Is it possible that this issue is not getting attention because it is still marked "can't reproduce"? Do you have MS SQL Server or Sybase so that you can recreate this behavior, using the example from my previous post? |
Sorry, mostly it is not getting attention because of huge amount of new tickets. |
I can't make it work in SQL Server Management Studio (it doesn't return output params). Anyhow, this seems to be SQL Server specific. We'll have a huge improvement in 5.2.5 (see #810). |
Hi all, still getting this issue with the latest 5.3.5 |
@artem-emelin Please provide more info (what database it is and some SQL sample) |
Sorry for delay, let me share more light.
|
@artem-emelin please create separate ticket, this is a different issue |
@souravs-2pirad please create a separate ticket. |
@joelsolon could you also make a separate ticket? It is impossible to track all issues related to plsql in a single ticket. |
Same issue occurred in Version 7.3.0.202011291229 when executing ms-sql SP. It will execute straightly without asking to fill any parameters. |
I have a stored procedure that itself returns a value, as well as returning values for the 3rd and 4th arguments. DBeaver seems to understand this:
But when I try to call the stored procedure it doesn't recognize the difference between input arguments and return/output parameters. This doesn't work:
? = FCE_Operations.ATM_GetAmountOutAndFee(100,0.5,?,?)
Instead, DBeaver asks me to supply values for the 3 ?'s and I get java.lang.NullPointerException.
The text was updated successfully, but these errors were encountered: