Hi there,
I just want to inform you about a bug inside DOA when I try to access table with "Table of Object" Object types.
After I have checked the source code it seems that for all nested object types resulted by an TOracleQuery (select statement) the "Table" field of TOracleObject is never set and as consequence the selected object is marked as non persistent.
Because of that when I have a nested object with a Lob Attribute the program checks if the BaseObject is persistent (which is always false in this case !!!) and if not DOA will reset the LocatorHandle and set it wrong to NULL.
The consequence is the inability of my client application to access the contents of my nested records anymore.
Please advise us how to solve this problem.
Thank you, Marian
*********************************************
To test this problem just create the following objects:
CREATE OR REPLACE type MSGDATAREC as object
(
filename VARCHAR2(300),
filedata BLOB
)
/
CREATE OR REPLACE type MSGDATALIST as table of MSGDATAREC
/
CREATE TABLE "TESTDATA"
( "SUBJECT" VARCHAR2(255),
"DATA" "MSGDATALIST"
)
NESTED TABLE "DATA" STORE AS "TESTDATA$MSGS"
RETURN AS VALUE
/
then setup some test data:
DECLARE
stext VARCHAR2(32767);
atext RAW(32767);
ldata BLOB;
nidx INTEGER;
BEGIN
delete from testdata;
for nidx in 0..9 loop
stext := 'Record: ' || nidx;
atext := UTL_RAW.cast_to_raw(stext);
DBMS_LOB.CreateTemporary(ldata, TRUE);
DBMS_LOB.WriteAppend (ldata, UTL_RAW.Length(atext), atext);
insert into testdata(SUBJECT, DATA)
values(stext, MSGDATALIST(MSGDATAREC('text.txt', ldata)));
DBMS_LOB.FreeTemporary (ldata);
end loop;
commit;
END;
/
and then try to access the TESTDATA.DATA[*].FILEDATA column:
Create TOracleQuery for (select * from testdata) and try to navigate through the DATA TOracleObject column.
I just want to inform you about a bug inside DOA when I try to access table with "Table of Object" Object types.
After I have checked the source code it seems that for all nested object types resulted by an TOracleQuery (select statement) the "Table" field of TOracleObject is never set and as consequence the selected object is marked as non persistent.
Because of that when I have a nested object with a Lob Attribute the program checks if the BaseObject is persistent (which is always false in this case !!!) and if not DOA will reset the LocatorHandle and set it wrong to NULL.
The consequence is the inability of my client application to access the contents of my nested records anymore.
Please advise us how to solve this problem.
Thank you, Marian
*********************************************
To test this problem just create the following objects:
CREATE OR REPLACE type MSGDATAREC as object
(
filename VARCHAR2(300),
filedata BLOB
)
/
CREATE OR REPLACE type MSGDATALIST as table of MSGDATAREC
/
CREATE TABLE "TESTDATA"
( "SUBJECT" VARCHAR2(255),
"DATA" "MSGDATALIST"
)
NESTED TABLE "DATA" STORE AS "TESTDATA$MSGS"
RETURN AS VALUE
/
then setup some test data:
DECLARE
stext VARCHAR2(32767);
atext RAW(32767);
ldata BLOB;
nidx INTEGER;
BEGIN
delete from testdata;
for nidx in 0..9 loop
stext := 'Record: ' || nidx;
atext := UTL_RAW.cast_to_raw(stext);
DBMS_LOB.CreateTemporary(ldata, TRUE);
DBMS_LOB.WriteAppend (ldata, UTL_RAW.Length(atext), atext);
insert into testdata(SUBJECT, DATA)
values(stext, MSGDATALIST(MSGDATAREC('text.txt', ldata)));
DBMS_LOB.FreeTemporary (ldata);
end loop;
commit;
END;
/
and then try to access the TESTDATA.DATA[*].FILEDATA column:
Create TOracleQuery for (select * from testdata) and try to navigate through the DATA TOracleObject column.