Page 1 of 1
How to get TOraRef from TOraObject?
Posted: Mon 10 Jul 2006 13:05
by NightProwler
There is TOraObject.
How to get Ref on this object (like OCIObjectGetObjectRef)?
I try
Code: Select all
r: TOraRef;
o: TOraObject;
.......
o := sql1.ParamByName('Par1').AsObject;
r := TOraRef.Create(o.ObjectType);
r.Assign(o);
But in this case
return empty string.
Thanks.
Posted: Tue 11 Jul 2006 09:03
by Plash
ODAC doesn't have such feature. You should use REF function in SQL to obtain object reference.
Posted: Tue 25 Jul 2006 14:23
by NightProwler
Perhaps, OCIObjectGetObjectRef has wrong declaration in OraCall?
In OCI ori.h
Code: Select all
sword OCIObjectGetObjectRef( OCIEnv *env, OCIError *err, dvoid *object, OCIRef *object_ref );
In OraCall
Code: Select all
_OCIObjectGetObjectRef = function (... var object_ref: pOCIRef) ...
It seems that pOCIRef is equivalent to OCIRef*, then var is unnecessary?
I tried to call OCIObjectGetObjectRef(.... r) where
It is not working. When I call OCIObjectGetObjectRef(.... Pointer(r^)), it's OK.
Say, OCIObjectGetObjectRef is used in TOraObject and it's work... I don't understand why.
Posted: Wed 26 Jul 2006 09:21
by Plash
Thank you for assistance. We have corrected the declaration of OCIObjectGetObjectRef function. This correction will be included in the next build of ODAC.