We are using Object view wich is based on the next type:
create or replace type Invoice_Type as object
(
Invc_Sid NUMBER(20),
Sbs_No NUMBER(5),
Store_No NUMBER(5),
Invc_No NUMBER(10),
Invc_Type NUMBER(5),
Status NUMBER(5),
Proc_Status NUMBER(10),
Cashier_Id NUMBER(10),
Cust_Sid NUMBER(20),
Addr_No NUMBER(5),
ShipTo_Cust_Sid NUMBER(20),
ShipTo_Addr_No NUMBER(5),
Station CHAR(1),
Workstation NUMBER(5),
Use_Vat NUMBER(1),
Vat_Options NUMBER(10),
SO_No VARCHAR2(14),
Cust_PO_No VARCHAR2(10),
Note VARCHAR2(7),
Disc_Perc NUMBER(16,4),
Disc_Amt NUMBER(16,4),
Tax_Area_Id NUMBER(5),
Tax_Reb_Perc NUMBER(16,4),
Tax_Reb_Amt NUMBER(16,4),
Rounding_Offset NUMBER(16,4),
Created_Date DATE,
Modified_Date DATE,
Post_Date DATE,
Cust_Fld VARCHAR2(47),
Tracking_No VARCHAR2(24),
Ref_Invc_Sid NUMBER(20),
Audited NUMBER(1),
CMS_Post_Date DATE,
-- Extra Lookup fields
Tax_Area_Name varchar2(11),
Store Store_Type,
Region_Name varchar2(12),
/* Offensive type */
Cashier Employee_Type,
Customer Customer_Type,
Cust_Address Cust_Address_Type,
ShipTo_Customer Customer_Type,
ShipTo_Cust_Address Cust_Address_Type,
-- Details
Invc_Items Invc_Item_Tab,
Invc_Tenders Invc_Tender_Tab,
Invc_Fees Pos_Fee_Tab,
Invc_Comments Comment_Tab,
Invc_Suppls Udf_Tab,
-- Methods
member function Items_Count return pls_integer
)
One of the embedded objects is of the Employee_Type:
create or replace type Employee_Type as object
(
-- Author : ABRYNDIN
-- Created : 1/4/2002 3:11:17 PM
-- Purpose :
-- Attributes
Empl_Id NUMBER(10),
Sbs_No NUMBER(5),
Empl_Code VARCHAR2(3),
Empl_Name VARCHAR2(20),
Comm_Lvl CHAR(1),
Drawer NUMBER(5),
Time_Shift_No NUMBER(5),
Max_Disc_Perc NUMBER(16,4),
Job_Id NUMBER(10),
Active NUMBER(1)
)
When 'select value(v) from invoice_ov v' statement is issued from the TOracleQuery we have unpredictable results in Dephi application, for instance Invc_Items collection field has instance equal to nil, and if the same SQL issued from PLSQLDeveloper grid shows '' in fields of Customer object which follows Cashier object (declared next to it). If the last field in Employee_Type definition (Active number(1)) is dropped or datatype is changed to something else, like varchar2(1) for instance everything works fine.
Seems like sometimes DOA calculates fielddata offset incorrectly.
create or replace type Invoice_Type as object
(
Invc_Sid NUMBER(20),
Sbs_No NUMBER(5),
Store_No NUMBER(5),
Invc_No NUMBER(10),
Invc_Type NUMBER(5),
Status NUMBER(5),
Proc_Status NUMBER(10),
Cashier_Id NUMBER(10),
Cust_Sid NUMBER(20),
Addr_No NUMBER(5),
ShipTo_Cust_Sid NUMBER(20),
ShipTo_Addr_No NUMBER(5),
Station CHAR(1),
Workstation NUMBER(5),
Use_Vat NUMBER(1),
Vat_Options NUMBER(10),
SO_No VARCHAR2(14),
Cust_PO_No VARCHAR2(10),
Note VARCHAR2(7),
Disc_Perc NUMBER(16,4),
Disc_Amt NUMBER(16,4),
Tax_Area_Id NUMBER(5),
Tax_Reb_Perc NUMBER(16,4),
Tax_Reb_Amt NUMBER(16,4),
Rounding_Offset NUMBER(16,4),
Created_Date DATE,
Modified_Date DATE,
Post_Date DATE,
Cust_Fld VARCHAR2(47),
Tracking_No VARCHAR2(24),
Ref_Invc_Sid NUMBER(20),
Audited NUMBER(1),
CMS_Post_Date DATE,
-- Extra Lookup fields
Tax_Area_Name varchar2(11),
Store Store_Type,
Region_Name varchar2(12),
/* Offensive type */
Cashier Employee_Type,
Customer Customer_Type,
Cust_Address Cust_Address_Type,
ShipTo_Customer Customer_Type,
ShipTo_Cust_Address Cust_Address_Type,
-- Details
Invc_Items Invc_Item_Tab,
Invc_Tenders Invc_Tender_Tab,
Invc_Fees Pos_Fee_Tab,
Invc_Comments Comment_Tab,
Invc_Suppls Udf_Tab,
-- Methods
member function Items_Count return pls_integer
)
One of the embedded objects is of the Employee_Type:
create or replace type Employee_Type as object
(
-- Author : ABRYNDIN
-- Created : 1/4/2002 3:11:17 PM
-- Purpose :
-- Attributes
Empl_Id NUMBER(10),
Sbs_No NUMBER(5),
Empl_Code VARCHAR2(3),
Empl_Name VARCHAR2(20),
Comm_Lvl CHAR(1),
Drawer NUMBER(5),
Time_Shift_No NUMBER(5),
Max_Disc_Perc NUMBER(16,4),
Job_Id NUMBER(10),
Active NUMBER(1)
)
When 'select value(v) from invoice_ov v' statement is issued from the TOracleQuery we have unpredictable results in Dephi application, for instance Invc_Items collection field has instance equal to nil, and if the same SQL issued from PLSQLDeveloper grid shows '' in fields of Customer object which follows Cashier object (declared next to it). If the last field in Employee_Type definition (Active number(1)) is dropped or datatype is changed to something else, like varchar2(1) for instance everything works fine.
Seems like sometimes DOA calculates fielddata offset incorrectly.