Page 1 of 1
Update or insert
Posted: Fri 07 Aug 2015 10:33
by calou
Hello,
when we use update or insert with IBCQuery, would it be possible to know if it is an insert or an update which has occurred in the database?
Thanks for help
Re: Update or insert
Posted: Tue 11 Aug 2015 10:50
by ViktorV
To determine whether a record was inserted or updated at execution of an UPDATE OR INSERT statement, you can use the TIBCQuery.RowsInserted or TIBCQuery.RowsUpdated events. See more details in the IBDAC help:
https://www.devart.com/ibdac/docs/?deva ... serted.htm and
https://www.devart.com/ibdac/docs/?deva ... pdated.htm
Firebird has an event handling mechanism that allows to generate messages on the server side (e.g. about database modifying) and send them to client applications. More details about Firebird events:
http://www.firebirdsql.org/file/documen ... events.pdf
Using IBDAC, you can organize event handling in an application with the TIBCAlerter component. Learn more at
https://www.devart.com/ibdac/docs/?deva ... lerter.htm You can also see find the IbDacDemo project, in which event handling is implemented, in the 'Demos\IbDacDemo' folder relatively to the IBDAC demos installation path.