How to Describe Neste Package in OCI Oracle [message #230608] |
Thu, 12 April 2007 05:40 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
tamnguyen
Messages: 2 Registered: April 2007 Location: Viet Name
|
Junior Member |
|
|
Hi everybody,
I can't describe the package that has content:
CREATE OR REPLACE PACKAGE TEST_NESTED_TYPES IS
TYPE EmpRecord1 IS Record (
LEVEL_NO NUMBER(1) default 1,
EMPNO NUMBER(4),
ENAME VARCHAR2(10),
HIREDATE DATE,
SAL NUMBER(7,2),
INSERT_FLAG boolean,
EmpRec2 EmpRecord2
);
TYPE EmpRecord IS Record (
EMPNO NUMBER(4),
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
MGR NUMBER(4),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2),
INSERT_FLAG boolean,
EmpRec1 EmpRecord1
);
PROCEDURE add_employee_record(
empinfo in EmpRecord
);
END TEST_NESTED_TYPES;
I have use OCI function OCIDescribeAny(...) bug result is error.
Please tall me how to describe it.
Thanks,
Tam Nguyen.
|
|
|
|
|
Re: How to Describe Neste Package in OCI Oracle [message #230800 is a reply to message #230608] |
Thu, 12 April 2007 21:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
tamnguyen
Messages: 2 Registered: April 2007 Location: Viet Name
|
Junior Member |
|
|
OCIDescribeAny() function is called more times in my project and execute successful with other package or procedure. But can't the package that type is nested.
This is my code that call OCIDescribeAny() function:
OCIParam *programList = (OCIParam *)0;
ub2 numargs;
ProcedureParameterVector_var result;
int i;
OCIParam *parmh = (OCIParam *) 0;
OCIDescribe *dschp = (OCIDescribe *)0;
OCIHandleAlloc(
(dvoid *)SDBConnectionOracle::getOCIEnv(),
(dvoid **)&dschp, (ub4)OCI_HTYPE_DESCRIBE, (size_t)0, (dvoid **)0
);
ub4 length = (ub4)strlen(tname);
errorCode_ = OCIDescribeAny(
ociConn->svchp, ociConn->errhp,
(dvoid *)tname, (ub4)strlen(tname),
OCI_OTYPE_NAME, 0, OCI_PTYPE_PKG, dschp
);
with:
tname = "TEST_NESTED_TYPES"
and Error message: "ORA-04043: object DBNAME.TEST_NESTED_TYPES does not exist".
Only this package not successful.
|
|
|
|