Define the following table and types in Oracle DB. I work with an Oracle 11g Standard
Code: Select all
create or replace type id_set_t as table of number(18);
/
create or replace type subtipo as object
(
a_id number(18),
a_class_name varchar2(30)
);
/
create or replace type tipo1 as object
(
a_id number( 18 ),
a_create_time timestamp with time zone,
a_id_set id_set_t,
a_sub subtipo
);
/
create table tipo1_table of tipo1
nested table a_id_set
store as tipo1_ids;
insert into tipo1_table values(1000, systimestamp, NULL, subtipo(1000,'aaaaa'))
Code: Select all
object Session: TOraSession
DataTypeMap = <
item
DBType = 111
FieldType = ftTimeStamp
end>
Left = 640
Top = 352
end
Code: Select all
object Qry: TOraQuery
Session = Session
Left = 600
Top = 256
end
object OraProvider: TOraProvider
DataSet = Qry
Left = 521
Top = 257
end
object DataSet: TClientDataSet
Aggregates = <>
PacketRecords = 10
Params = <>
ProviderName = 'OraProvider'
Left = 448
Top = 256
end
OnClick
Code: Select all
Qry->SQL->Text = MemoQuery->Text;
if (DataSet->Active)
{
DataSet->Close();
}
DataSet->Open();
Code: Select all
select * from tipo1_table
Code: Select all
select value(x) from tipo1_table x
Field 'VALUE(X).A_CREATE_TIME' is of an unknown type.
So the data type mapping in TOraSession doesn't work when the type is stored inside an Oracle Object.
Code: Select all
select a_id_set from tipo1_table
Project AppClientDS.exe raised exception class EDSWriter with message ''.
At run time
Catastrophic Failure