how to recover an oracle object type in Delphi

Naceur

Member
I created a oracle object type, and I used it in functions PL/SQL like value of return. and I want to call these functions in Delphi.
can you give me a step to do that knowing that I use
oracle 9i, delphi5/Direct Oracle Access 3.4.5

Thank you
 
OK and Thank you in advance

below an interface of code which I used:

-**** Object Type PL/SQL
create or replace type MyObjectType as object
(.....
STATIC FUNCTION Init(pCODE INTEGER) RETURN MyObjectType,
member procedure Calculer,
...)

-**** Package function PL/SQL
FUNCTION Test_1(pCODE INTEGER) RETURN MyObjectType IS
Obj MyObjectType;
BEGIN
obj := MyObjectType.Init(pCODE);
Obj.Calculer;
RETURN Obj;
END;
-**** DELPHI Function
how to call the function Test_1() and to recover the turned over object???
 
STATIC FUNCTION Init(pCODE INTEGER) RETURN MyObjectType IS
BEGIN
DECLARE
p_CODE NUMBER(8);
p_LABEL VARCHAR(100);
....
BEGIN
SELECT
CODE, LABEL ... FROM MyTABLE INTO p_CODE, p_LABEL , ... WHERE CODE = pCODE;
RETURN MyObjectType(p_CODE, p_LABEL, ...);
END;
 
Back
Top