Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to execute a PL/SQL block in C++?

How to execute a PL/SQL block in C++?

From: Nadeem Akhtar <n_akhtar_at_email.msn.com>
Date: Wed, 25 Nov 1998 09:33:48 -0500
Message-ID: <#TWT9BIG#GA.222@upnetnews05>


Hello,

        I am writing an application which requires users to create dynamic PL/SQL Block code e.g
DECLARE
v_custid INTEGER;
v_custno INTEGER;

BEGIN

        //GetPeriodNo is a defined function
        IF (GetPeriodNo()=5) THEN
            Select custid
            INTO    v_custid
            FROM customer
            WHERE custno='10';
        END IF;

END; and then execute these blocks.. I am using Visual C++ along with Oracle Call Interface (OCI). I have created an editor in my program for the users to type this type of PL/SQL code in it. When I take this PL/SQL Block and use OCIStmtExecute. The program just hangs no error is returned neither the PL/SQL is executed. When I take the exact same block in SQL Plus or SQL Worksheet it runs fine..

I have tried and exhausted myself trying to debug this but have not been successful.
Any suggestions, help in this matter would be greatly appreciated.

Thanks in advance.
n_akhtar_at_msn.com Received on Wed Nov 25 1998 - 08:33:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US