01-28-2020 04:51 AM
in a few cases we get problems with synchronizing app, probably when internet connection is low or in offline mode.
If we have such a synchronizing problem you only can see and access data in app in offline mode. No more synchronization can be done.
What kind of methods do we have to solve synchronizing problems?
Here a practical case, where we had the following synchronizing problem:
The error is a foreign key conflict by INSERT:
"Die INSERT-Anweisung steht in Konflikt mit der FOREIGN KEY-Einschränkung 'FK_B_A'.
Der Konflikt trat in der Datenbank, Tabelle 'dbo.A', column 'ida' auf. Die Anweisung wurde beendet."
So it seems that we want to insert an entry for table B which doesn't have corresponding entry to table A
we have the following database scenario:
table A: primary key: ida
table B: primary key: idb, foreign key to table A: foreign_a
In our database we have an INSTEAD OF DELETE trigger for table A which first deletes corresponding entries from table B before entry in table A will be deleted.
So in normal case (and if we are online), if somebody deletes one entry of table A without deleting corresponding entry of table B, trigger will solve this problem.
But if we're offline and user defines a new entry 'a' for Table A and a corresponding entry 'b' for table B and user deletes entry 'a' after that but before synchronizing, only entry 'b' would be inserted in database (without corresponding entry 'a') which belongs to a foreign key concflict.
Problem about the conflict is, that we can’t see which entry is causing the trouble.
4. Is there a possibility in mobile app to automatically delete entry 'b' when 'a' will be deleted ?
Thank you very much,
01-31-2020 09:40 AM
There is currently not a method of getting directly to the database on the mobile device to review/manage what is not yet synched.