Re: PRO*C & Stored Procedures

From: Lawrence Simela <lsimela_at_mahalini.prestel.co.uk>
Date: 1998/01/11
Message-ID: <69aovt$udq$1_at_svr-c-01.core.theplanet.net>#1/1


[Quoted] Could you give us an example of what you mean?

Surely calling a packaged function from pro*c is something like:

    EXEC SQL EXECUTE

        DECLARE
        C_TRUE      INTEGER  := 1;
        C_FALSE     INTEGER := 0;
        BEGIN
            IF pkg.function THEN
               :bUpdateSucceeded:nUpdateInd := C_TRUE;
            ELSE
               :bUpdateSucceeded:nUpdateInd := C_FALSE;
            END IF;
        EXCEPTION
            WHEN OTHERS THEN
                :bExceptionOccurred:nExcInd := C_TRUE;
                :bUpdateSucceeded:nUpdateInd := C_FALSE;
        END;

    END-EXEC; why do you need to include the database name in the call? Please clarify..

Lawrence Simela
MAHALINI CONSULTING LIMITED Michael Plakus wrote in message <692rtt$24k$0_at_208.10.2.144>...
>I would like to write a PRO*C program to call a stored procedure. I've
>got it to work, but I have to specify the database name as part of the
>call. When I do this and run on our development box it works fine,
>however the database name on the production box is different than the
>database name on the developement box. When I copy the compiled code to
>the development box it won't run. I've tried changing the name of the
>database on the development box, but PRO*C must validate, because I get
>a compiler error reporting the stored procedure is not there. Is there a
>way to code this so I don't have to put the database name in the
>program?
>
>Thanks.
>
>--
> Bright images flashing by
> Like windshields towards the fly
>
>
Received on Sun Jan 11 1998 - 00:00:00 CET

Original text of this message