Page 1 of 1

TOraUpdateSQL version 5.80.0.39 for Delphi 5 not working with inserts and triggers

Posted: Mon 30 Apr 2007 18:36
by programsunlimited
I recently converted an application to use ODAC. The insert/update/delete logic used the BDE UpdateObject and cached updates. After the conversion the update and delete logic works correctly, but the insert behaves as if the primary key is not being generated by the trigger prior to the insert.

The tables use BEFORE_INSERT triggers to get the primary key from a sequence.

Are there settings that I've missed in the ODAC components?

The general Delphi error is EDatabaseError Field {PrimaryKeyFieldName} must have a value

Posted: Thu 03 May 2007 09:24
by Plash
You should create fields for the TOraQuery component in design time, if the fields are not created yet. Then set the Required property of the primary key field to False.