SqlDbx Forum

SqlDbx

You are not logged in.

#1 2019-02-01 19:28:38

bking2k
Member

Error executing stored procedures

Every time I try to execute stored procedures that has OUT parameters, it gave me this errors

ORA-01036: illegal variable name/number
ORA-24374: define not done before fetch or execute and fetch

It begin to happen when I reinstalled Oracle (on a different folder), and even this simple SP also give me that error:

CREATE OR REPLACE PROCEDURE SP_TRYOUT (pNum NUMBER, pSal OUT NUMBER)
AS
BEGIN
    SELECT count(*) INTO pSal FROM TABLE1 WHERE ROWNUM < pNum;
END;

After receiving the error, I can't do anything else, not even a single "select * from table1" works, I have to reconnect to the database in order to work again.

I'm using Oracle 11.2G

Do you happen to know what could be wrong and how can I fix it?

I preciate. Regards.

BK

Last edited by bking2k (2019-02-03 12:21:35)

Offline

#2 2019-02-10 00:06:43

sqldbxhelp
Administrator

Re: Error executing stored procedures

When you execute stored procedures with out parameters you should right click on procedure in object view and select "Script Execute" menu item.
In your case it would create following snippet and you will be able to run it
BEGIN
    SP_TRYOUT (10, :psal$NUMBER);
END;

Offline

#3 2019-02-12 07:24:00

bking2k
Member

Re: Error executing stored procedures

Hi, thanks for you answer. I tried too, but the result was the same. Also I never need to script it to execute, and in another machine works fine executing directly. I think I'm going to reinstall sqldbx to see if it works, because I don't see any way out...

Offline

Board footer

Powered by FluxBB