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 -> Re: OO4O with PL/SQL stored procedure exmaple -- Need Help!!

Re: OO4O with PL/SQL stored procedure exmaple -- Need Help!!

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/02/06
Message-ID: <6bei2o$uor$3@news00.btx.dtag.de>#1/1

On 5 Feb 1998 14:00:24 -0500, kapdo_at_Glue.umd.edu (Kap Do Jang) wrote: Hi, Kap,

>
>
>Hi, I have a problem with OO4OLE calling a PL/SQL stored procedure example
>in an online document.
>I made a package "employee" as in an example like this:
>
>----------------------------------------------------------------------
>package Employee as
> type NUMARRAY is table of NUMBER index by BINARY_INTEGER; --Define
 <snipped>
> PROCEDURE GetEmpName (inEmpno IN NUMBER, outEmpName OUT VARCHAR2);
> FUNCTION GetEmpSal (inEmpno IN NUMBER) RETURN NUMBER;
>end Employee;
>
>package body Employee as
> ...
>
> ...
>PROCEDURE GetEmpData(indeptno IN NUMBER, EmpCursor IN OUT empCur) is
>BEGIN
> open EmpCursor for
> select * from emp where deptno = indeptno;
>END;
>
>end employee;
>--------------------------------------------------------------------
>
>and in my source code(VC++ 5.0) I called it like this:
>
> m_database.Open("dbname", "login/password", 0);
> OParameterCollection params = m_database.GetParameters();
> params.Add("DEPTNO", 20, OPARAMETER_INVAR, OTYPE_NUMBER);
>
> if (m_dynaset.PlsqlOpen(m_database,
> "Begin Employee.GetEmpData (:DEPTNO, :p_cursor); end;",
Here it is:

            "Begin Employee.GetEmpData (:DEPTNO, :EmpCursor); end;",

||
use the same name as in the package declaration ======

> "EmpCursor",
> ODYNASET_DEFAULT))
> {
> char buf[256];
> sprintf(buf, "%s",m_dynaset.GetErrorText());
> MessageBox(buf);
> exit(1);
> }
> ....
>
>I have an error message saying:
>
> "Output data binding error, ORA-01036: illegal variable name/number"
>
>
>I don't know much about oracle PL/SQL, OO4O and even VC++, so it's not
>easy
>for me to see what makes this problem. I'm running VC++ 5.0 in NT with
>Oracle 7.3.
>
>Do I have to do something with p_cursor? Where this one declared with what
>type?
>
>Would you tell me what I missed in here? Appreciate your help.
>
>Regards,
>
>Kap Jang
>(202)283-4931
>kapdo_at_isr.umd.edu
>
>
>
>
>

--

Regards

Matthias Gresz    :-)
Received on Fri Feb 06 1998 - 00:00:00 CST

Original text of this message

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