We are upgrading our application from Delphi 2005 to Delphi 2010. We are using ODAC version 5.55.1.22 on Delphi 2005 , we purchased latest version of ODAC professional(odac 6.9) for Delphi 2010.
On latest version of ODAC we are getting ORA-00904 error on OraTable.Insert on parent table of parent- child relationship tables( 9 tables in hirerachy). It begins with OraSession.StartTransaction, then ParentTable.Insert, that puts all children tables in Insertmode. Parent Child relation is established by MasterSource, Master fields on OraTables. It works fine with old ODAC version under Delphi 2005. On dbmonitor it shows error on following SQL after parent table is in insert mode.
SELECT N, Y, R, N, N FROM Dual
We are not using Dual in our application other than to get nextval of sequence and that also not used in the above insert statement.
Oracle database: Oracle 10g 10.2.0.1.0
Any help to resolve the issue ASAP will be highly appreciated.
Thanks,Praveen.
ORA-00904 ERROR
Thanks for the reply. I set MemDS.DefaultExpressionOldBehavior=true on oncreate event of datamodule and error above disappeared. Now i am getting error on field on OraTable where default expression is 0.00, on Post event it gives Credit field need value. Is there different format for default expression for numeric/decimal values
I checked all the fields for defaultexpression and they are correct. I had to manually add OraTable.FieldByName('Test').AsFloat := 0.00 after OraTable.Insert to fix this issue.We have more than 50 tables and most of them have around 50 fields, it is time consuming to manually set values.
Thanks,Praveen.
Thanks,Praveen.