Jump to content
Joe Sansalone

IBX & FireDAC, Change Views

Recommended Posts

Hi,

 

If I set a subscription active in a transaction and then 

execute "Select * from Table1", how do I check if a field has been updated, 

or row has been deleted or inserted (other than using IS Updated, or IS Inserted in the SQL).

 

Is it a new property of TDataSet or TField??

 

Joe

Share this post


Link to post

You can start from the help: https://docwiki.embarcadero.com/RADStudio/Sydney/en/Data_Change_Notifications_(FireDAC)#:~:text=The Data Change Notifications feature,database client about these changes.

 

For more information of how to configure the the Change Views feature, you can find a demo project at:

  • Start | Programs | Embarcadero RAD Studio Sydney | Samples and navigate to Object Pascal\Database\FireDAC\Samples\DBMS Specific\InterBase\ChangeView\Generic
  • Like 1

Share this post


Link to post

For InterBase Change Views use with IBX (InterBase Express), I am told you can use the following to get the change state of each field in your dataset.

 

Get the change state using the function https://docwiki.embarcadero.com/Libraries/Alexandria/en/IBX.IBSQL.TIBXSQLVAR.ChangeState

https://docwiki.embarcadero.com/Libraries/Alexandria/en/IBX.IBSQL.TIBChangeState has various possible change states defined.

 

for e.g.

    for fld in Dataset.Fields do

      a[fld.FieldNo - 1] := ChangeState(fld);

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×