TOracleObject, changing of attributes

jschmied

Member²
I defined an object as:
-----
CREATE OR REPLACE TYPE CFKT AS OBJECT(

sDATA VARCHAR2(100),

MEMBER PROCEDURE funktion1());
-----
CREATE OR REPLACE TYPE BODY CFKT AS

MEMBER PROCEDURE funktion1() IS
BEGIN
sDATA := '123';
END funktion1;
END;

---
The I do:

sOData := TOracleObject.Create(OracleQuery3.Session,'CFKT','');
sOData.SetAttr('sData','321');
sOData.CallMethod('funktion1',[]);

if I then call
sOData.GetAttr('sData'));
I get the value '321' back instead of '123' like changed in the object method.

Why isn't the object method changing the attribute?

Thanks

Juergen
 
The first versions of Net8 / Oracle8 would lead to an ORA-03113 exception when object instances were used as output variables. Therefore this feature has been disabled by default. You can enable it by setting the global boolean variable ModifyingMethods in the Oracle Unit to True in your application:
Code:
initialization
  Oracle.ModifyingMethods := True;

------------------
Marco Kalter
Allround Automations
 
Back
Top