Re: Trouble calling stored procedure from Pro*C

From: paul cluiss <paul_cluiss_at_intervoice.com>
Date: Fri, 16 Jul 1999 08:32:19 -0500
Message-ID: <378F3463.12E07EB7_at_intervoice.com>


Robert,

That's right. In SqlPlus one is already logged in, so no problem. However, sitting at the Unix command-line, when one compiles one's program using SQLCHECK=SEMANTICS one must also use USERID=name/passwd because this compile option actually temporarily logs into the Oracle database to perform semantic checking of the program's SQL statements. If the login fails, then the checks can't be done, so the compile fails. That's what happened to me. I didn't pass the login id correctly. This is all fine with me; my only beef was with the misleading error message. It said nothing about failure to login, but it said that I must declare my stored procedure. That's very aggravating. Thankfully, I've solved it. Thanks for looking into it, though.

Paul Cluiss
Dallas, Texas

rtproffitt_at_my-deja.com wrote:

> In SQLPlus, you are already logged in and
> connected to a USER and the USER already
> can SEE the stored procedure.
>
> How are you telling the Pro/C compiler
> what SID and USER to look at during the compile
> for validating the SQL statements?
> Does this USER have the same
> rights to "SEE" the procedure in question?
>
> Robert Proffitt
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

paul cluiss wrote:

> Hello, everyone.
>
> I know this error has already been disgust a couple of times at least,

> but I'm getting it from the Pro*C compiler, although SqlPlus can
execute
> the stored procedure correctly. Here's the error from Pro*C when I
> attempt to compile oraclient.pc:
>
> BEGIN oraclient.validate_card(:theAuthCode, :thePin,
> :vFlag);
> ......................1
> (1) PCC-S-02201, identifier 'ORACLIENT.VALIDATE_CARD' must be declared

>
> BEGIN oraclient.validate_card(:theAuthCode, :thePin,
> :vFlag);
> ......................1
> (1) PCC-S-02000, Statement ignored
>
> Semantic error at line 136, column 3, file oraclient.pc:
> BEGIN oraclient.validate_card(:theAuthCode, :thePin,
> :vFlag);
> ................1
> (1) PCC-S-02346, PL/SQL found semantic errors
>
> *** Error exit code 1
>
> Stop.
>
> Oddly enough, I can call this stored procedure from my test script in
> SqlPlus, and it works fine. I created this procedure inside a package

> called "oraclient" under my account, and I can run it from SqlPlus
from
> my account, so I don't think this is a security issue. This has got
me
> stumped. Any help would be greatly appreciated. Thanks.
>
> Paul Cluiss
> Dallas, Texas
Received on Fri Jul 16 1999 - 15:32:19 CEST

Original text of this message