Here is the package:
Code: Select all
create or replace package "Dev".Test
AS
type curvar_type is ref cursor return address_type%rowtype;
procedure get_address_types (str in varchar2, curvar_out out curvar_type);
END;Code: Select all
create or replace package body "Dev".Test
AS
procedure get_address_types
(str in varchar2, curvar_out out curvar_type)
AS
local_cur curvar_type;
BEGIN
open local_cur for select * from address_type;
curvar_out := local_cur;
END;
END Test;However, adding a parameter I cannot get it to work.
Here is the C++ code:
Code: Select all
TOraStoredProc* procTest = NULL;
TParam* param = NULL;
String type, displayOrder;
if (!procTest)
{
procTest = new TOraStoredProc(0);
procTest->Session = oraSession;
procTest->StoredProcName = "dev.test.get_address_types";
procTest->ParamCheck = false;
param = procTest->Params->CreateParam(
ftString,
"str",
ptInput);
procTest->Params->AddParam(param);
}
String sql;
try
{
procTest->ParamByName("str")->AsString = "Hello";
procTest->Open();
}
catch (const Exception& e)
{
String errMsg = e.Message;
int k = 5;
}Any help would be appreciated.ORA-06550: line 2, column 3:
PLS-00306: wrong number or types of arguments in call to 'GET_ADDRESS_TYPES'
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored