Click to See Complete Forum and Search --> : calling stored procedures from forms6i


jee
10-20-2000, 01:49 AM
Hi,

can anyone help me in this.

dev 6i

I have a table which contains the name of my stored procedures.

In the form during runtime i need to call one of stored procedure and i need to pass the values for the parameters.
(so dynamically i am identifying the name of the procedure)

select procedure_name into v1 from table_name where some condition;

v1(p1,p2); -- calling the procedure

Now i am getting invalid procedure during compilation.

how to dynamically call procedure in forms.

thanks in advance.

regards,
jee

akkerend
10-20-2000, 08:24 AM
You have to use Dynamic SQL

In 8i:

select procedure_name into v1 from table_name where some condition;

execute immediate 'begin '||v1||'(p1,p2); end;'

In Oracle <8i use DBMS_SQL package.