M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 58
Registered: ‎11-15-2018

Mobile APP: problems with synchronizing and offline

Hello,

 

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?

  1. Is it possible to find out which entry causes synchronizing problem,
    because there could be a lot of entries (new entries and changed entries) which could be responsible for sync problem
    if a user collects a lot of data for several days in offline mode.
  2. Is it possible to see which entries are already synchronized?
  3. Is there a possibility to export all offline data f.e. in a text file in order to compare all offline data with online database?


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,

regards, Iris

 

 

Highlighted
Technical Evangelist
Posts: 707
Registered: ‎11-12-2015

Re: Mobile APP: problems with synchronizing and offline

hi iheller,

 

There is currently not a method of getting directly to the database on the mobile device to review/manage what is not yet synched.

 

However, there was recenlty a fix introduced to M.App Enterprise 2019 Update 2 where there were issues with synching when the a database record was deleted/updated on the backend, while simultaneously being listed to be synched in the Mobile M.App. This of course caused issues with synching and may be similar to what you describe here.
 
if you havent already, I would suggest upgrading to that latest release. The device should sync again after the server upgrade of version.