Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Stored Procedures Help!!!!
You do not need to use dynamic sql. All you need to do is use an anonymous PL/SQL block in the PRO*C program. You would do the following:
EXEC SQL EXECUTE
DECLARE
<variables to declare>
BEGIN
<code or call to a stored proc>
EXCEPTION
<exception processing>
END;
END-EXEC
HTH
Eric Peterson, DBA
Maurices Inc.
eric_peterNOson_at_maurices.inrg.cSPAMMERSom
The views I have expressed are soley my own and not that of my company's. To email me, remove the NO and the SPAMMERS.
In article <89jbp5$n9q$1_at_nnrp1.deja.com>,
skudsi_at_my-deja.com wrote:
> Hi,
> I am using PRO*C for building my application and I want to be able
> execute different stored procedure from C (depending on the a
parameter
> that is passed to me).
> I know I have to use dynamic sql but I have tried a lot of things and
> non is working. Here is how my procedures look like
> getX(var1 a char IN, var2 a char IN , var3 a number IN, var4 a number
> IN, var5 ref cursor IN OUT);
> All the procedure names start with get and X is passed as a
parameter.
> how can I build a dynamic sql statment to execute these procs note
also
> that all the variables passed to the procedure are host varaiables.
Any
> help is greatly appreciated...
>
> Sam. K.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Mar 01 2000 - 00:00:00 CST
![]() |
![]() |