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

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
programsunlimited
Posts: 3
Joined: Thu 11 Jan 2007 19:58

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

Post by programsunlimited » Mon 30 Apr 2007 18:36

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 03 May 2007 09:24

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.

Post Reply