Jump to content
Joe Sansalone

Change Views (2017 vs 2020 Server)

Recommended Posts

Hi,

 

I'm using the sample project Change Views,Generic that came with Delphi 11.

I changed the EventAlerter to use DataMerge instead of DeltaMerge, so that the query dataset is up to date exactly

like in the database.

 

It works with Interbase 2020 server perfectly (inserts, updates and deletes).

 

But if it's an Interbase 2017 server, deletes do NOT get processed.

(inserts and updates work properly)

 

Is this a bug?

 

Joe

 

 

Share this post


Link to post

I do recall an issue with FireDAC and Deletes in Change views (for some reason IBX was not affected).  I thought it was fixed in the latest patches for both 2017 and 2020, but I might be mistaken on that.  I have pinged Sriram on this to see if he can shed more light on it.

Share this post


Link to post

I also noticed something in Quality Central that referred to a similar issue.  

Updated to latest versions of IB2017 and IB2020 just recently (per Sriram's suggestion) .. still same problem.

 

I use IBX.  

Just recently used FireDAC because of FDEventAlerter/Subscription/DataMerge ability.

 

Is updating a dataset in IBX via Subscriptions/events similar to how FireDAC does it?

Where can I read up on IBX and Subscriptions?

 

 

Share this post


Link to post

I am not familiar with how FireDAC ended up implementing it.  IBX has an IBSubscription class for managing subscriptions, but much beyond that it will be manual to transfer changes from the main DB to a secondary or back.  You would just start a snapshot transaction, turn on the subscription read the data like normal and then walk the result set to and use a second connection and component to apply the changes. 

 

Adding some sort of merge feature would not be that difficult I think, but also something I'd have to wait until the next time I can do an interface breaking change.  Probably as simple as a MergeChangesTo and you pass an IBDatabase to use and it would use the existing InsertSQL et al but against the passed connection vs the original one.

Share this post


Link to post

A little more on this.  There was originally a bug with deletes so you need the latest patched version of IB (2020 and 2017 I am sure).  But with FireDAC there is more you have to do to see deletes.

 

"FireDAC is very different. In order to display deleted rows from a ChangeView, it is necessary to switch the FDQuery into cached updates mode. You then have to add rtDeleted to the FilterChanges property, which is only available when CachedUpdates is true. Once I did this, I saw the deleted rows. So it would seem, with a default FDQuery, deleted rows are actively excluded when querying from a change view that records deleted rows"

Share this post


Link to post

Jeff, 

 

CachedUpdates is true.  And I had the rtDeleted in FilterChanges property. 

I compiled again with 11.1 (just in case) and connected to a InterBase 2017 server (version 13.4.0.350).

 

Are you sure you were using Interbase 2017?  

 

I don't see deletes (tried both with DeltaMerge and DataMerge in the EventAlerter).

 

It works with Interbase 2020.

 

What exact version are you using with Interbase 2017?

 

Joe

 

 

Share this post


Link to post

Joe,

Thanks for your detailed notes, and Jeff, for your responses.

 

A fix is only available in InterBase 2020 Update 2 (circa Sep'2021) and later versions, not in InterBase 2017. InterBase 2017 is in "Passive Support", and we have no plans to deliver any more GA updates to InterBase 2017. The last public update to InterBase 2017 was done in Oct'2020. I recommend you transition to InterBase 2020 if you need this fix in production databases. 

 

Thanks!

Share this post


Link to post

@Joe Sansalone, if you have already established a connection with Embarcadero Support via an escalation, please get the latest build of InterBase 2020 from them to confirm the issue is truly resolved for your case, before making a purchase of InterBase 2020. You can use the latest build from Support over a 2020 Developer or Trial Edition to validate the fix for the issue you have discovered. A purchase/upgrade to InterBase 2020 for production can follow right after a successful test.

 

Thanks, and good luck!

 

Update:I had forgotten that you already have validated it works well against InterBase 2020. Go ahead with the upgrade then. Thanks. 🙂

Edited by Sriram

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

×