This bug relates to accessing the properties of a nested object that is not final.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
JServer Release 9.0.1.1.1 - Production
SQL> create type taddress as object (
2 line1 varchar2(30),
3 line2 varchar2(30),
4 line3 varchar2(30)) not final
5 /
Type created.
SQL> create type tperson as object (
2 firstname varchar2(30),
3 lastname varchar2(30),
4 address taddress) final
5 /
Type created.
SQL> create table people of tperson
2 /
Table created.
SQL> insert into people values
2 ('Fred', 'Harvey', taddress('1234 Somewhere', null, null))
3 /
1 row created.
SQL> commit;
Commit complete.
SQL>
SQL Plus works just fine. Now connect to this schema and run the following code:
procedure TForm1.Button1Click(Sender: TObject);
var
Person, Address: TOracleObject;
begin
OracleSession1.LogOn;
Person := TOracleObject.Create(OracleSession1, 'TPerson', 'People');
Person.SetAttr('FirstName', 'Bob');
Address := Person.ObjAttr('Address');
Address.SetAttr('Line1', '5432 Nowhere Ln.');
Person.Flush; // Crashes (access violation)
OracleSession1.Commit;
OracleSession1.LogOff;
end;
And when you close the app, you get an EExternalException.
Help.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
JServer Release 9.0.1.1.1 - Production
SQL> create type taddress as object (
2 line1 varchar2(30),
3 line2 varchar2(30),
4 line3 varchar2(30)) not final
5 /
Type created.
SQL> create type tperson as object (
2 firstname varchar2(30),
3 lastname varchar2(30),
4 address taddress) final
5 /
Type created.
SQL> create table people of tperson
2 /
Table created.
SQL> insert into people values
2 ('Fred', 'Harvey', taddress('1234 Somewhere', null, null))
3 /
1 row created.
SQL> commit;
Commit complete.
SQL>
SQL Plus works just fine. Now connect to this schema and run the following code:
procedure TForm1.Button1Click(Sender: TObject);
var
Person, Address: TOracleObject;
begin
OracleSession1.LogOn;
Person := TOracleObject.Create(OracleSession1, 'TPerson', 'People');
Person.SetAttr('FirstName', 'Bob');
Address := Person.ObjAttr('Address');
Address.SetAttr('Line1', '5432 Nowhere Ln.');
Person.Flush; // Crashes (access violation)
OracleSession1.Commit;
OracleSession1.LogOff;
end;
And when you close the app, you get an EExternalException.
Help.