Can't insert records using ODAC version 7.20 and Delphi 2010
Posted: Tue 28 Jun 2011 20:52
I’m migrating our applications from Delphi 5 using ODAC (Ver. 5.50.0.16) to Delphi 2010 using ODAC (Ver. 7.20.0.6). In our applications we commonly use the TOraTable components. Inside each object’s properties we specify the properties KeyFields and KeySequence. In the Delphi 5 version (using ODAC 5.50) new records are inserted without a problem. The component automatically makes the query "SELECT SEQNAME.NEXTVAL FROM DUAL” and assigns the returned value to the table and field where we want to insert records, but this doesn’t work when using Delphi 2010 with ODAC 7.20, instead a value of 0 is stored in the table for the inserted record.
Is this a bug in the component TQraTable for the ODAC version 7.20.0.6 or is there another property or approach that I should consider ?
Notes:
1.- We only get errors when inserting records, retrieving data and updates work fine.
2.- We are aware the we could write a function to query the NextVal manually, but it would require a lot of effort to fix this in all the applications, so we would like to know if there’s a way to do it since the previous version worked without any issues.
Thanks for your help
Is this a bug in the component TQraTable for the ODAC version 7.20.0.6 or is there another property or approach that I should consider ?
Notes:
1.- We only get errors when inserting records, retrieving data and updates work fine.
2.- We are aware the we could write a function to query the NextVal manually, but it would require a lot of effort to fix this in all the applications, so we would like to know if there’s a way to do it since the previous version worked without any issues.
Thanks for your help