Re: Calling stored proc from PRO*C

From: Alvin W. Law <alaw_at_us.oracle.com>
Date: 1995/09/05
Message-ID: <ALAW.95Sep5113339_at_ap283sun.us.oracle.com>#1/1


In article <421pcs$25f_at_hearye.mlb.semi.harris.com> tgillesp_at_ms13.mis.semi.harris.com (Tom Gillespie) writes:

> I need some advice on calling a stored PL/SQL procedure from
> a Pro*C program. I have a stored procedure called "trace"
> that I can run from SQL*Plus using the EXECUTE command.
> But when I try to execute it from an embedded C program,
> I get "PCC-S-02313, 'TRACE' not declared in this scope".
> Here is how I'm calling it from the C program:
>
> EXEC SQL EXECUTE
> BEGIN
> trace (:lot_nr, :fac_cd);
> END;
> END-EXEC;
>
> Do I have to declare the procedure name in a EXEC SQL DECLARE ?

When compiling a Pro*C program with PL/SQL fragments, you need to connect to a db user which has privileges to access all the objects referenced in the PL/SQL fragments, including tables, views and stored procedures.

--
 "Everything that can be said about Win95 has been said... The Win95 user
  interface is not nearly as good as the Mac.  Blah, blah.  It has all been
  said a thousand times." - Larry Ellison

 Alvin W. Law ........................................... Oracle Corporation
 Senior Technology Consultant ............... 300 Oracle Parkway, Box 659305
 Applications Design & Architecture ............... Redwood Shores, CA 94065
 Email: alaw_at_oracle.com ...... Voice: +1.415.506.8317 . Fax: +1.415.506.7294
Received on Tue Sep 05 1995 - 00:00:00 CEST

Original text of this message