Home » Developer & Programmer » Precompilers, OCI & OCCI » How to Describe Neste Package in OCI Oracle
How to Describe Neste Package in OCI Oracle [message #230608] Thu, 12 April 2007 05:40 Go to next message
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 #230618 is a reply to message #230608] Thu, 12 April 2007 06:18 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Easier if you show us exactly how you did it.....so we can follow the process and see the error message.
Re: How to Describe Neste Package in OCI Oracle [message #230622 is a reply to message #230618] Thu, 12 April 2007 06:24 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

You have read the specification for it I guess ?

OCIDescribeAny()
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 messageGo to next message
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.



Re: How to Describe Neste Package in OCI Oracle [message #230868 is a reply to message #230800] Fri, 13 April 2007 02:36 Go to previous message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Have a look on metalink they alot of examples, and topics about the ORA error which you are recieving.
Previous Topic: proc error
Next Topic: Returning value from a select count() statement
Goto Forum:
  


Current Time: Thu Mar 28 04:09:45 CDT 2024