Trigger doesn't work when inserting

maudo

Member
I'm using TOracleDataSet with TDBGrid. When I try to insert a new record the trigger related to the table I'm trying inserting to doesn't works.
What can I do?
 
What exactly doesn't work? It seems virtually impossible that an (enabled) database insert trigger does not fire. Or is there an error message?

Note that if you are using cached updates the database triggers will fire when you call TOracleSession.ApplyUpdates.

------------------
Marco Kalter
Allround Automations
 
I try to explain the problem better.
I'm using a TOracleSession with TOracleDataSet and TDataSource. In the TOracle DataSet the SQL is like "select rowid, tableName.* from tableName".
The table has a primarykey on a field (for Example: ID) and a trigger. If the field ID is null the trigger put max(ID) + 1 into ID.
I show all data using a DBGrid. When I update data there's no problem. I find the new data in the database.
When I try to insert a new raw whithout setting a value in the field ID I have an exception: Field ID cannot be NULL.

Thenks in advance
 
Back
Top