Hello,
I have a mobile app that has a local transaction table and a local image table. An Id number is given to the transaction record when created. When a picture is taken for the record it is stored it is given an id of a nullidentifier and the transaction identifier generated when the parent record was created so can be a one to many relationship of transaction to images. I have consolidated this all into one server action for an offline data sync
My issues is when I sync sometimes the connection will time out, no idea why (BTW is there someway to find out). I have set the offline datasync configuration to retry on error. When it does this I sometime get an primary key insert error on the server side because the all records are sent again.
Is there any way I can keep this from happening?
thanks
jackyjoy
Hi,
For this "My issues is when I sync sometimes the connection will time out" it's possible that the data you send is very big (MB) so the timeout is triggered. My suggestion is for image, you compress/resize it first before save to local and send to server (https://www.outsystems.com/forge/component-overview/5546/resize-image-mobile).
For "no idea why (BTW is there someway to find out)" you can check on the service center - monitoring, on errors and screen requests. Also if you tested this on android, using logcat will help show log from the android device (https://developer.android.com/studio/command-line/logcat)
Thanks
Hi Jacky Joy,
As Toto mentioned some of the references; I would like to mention some other practices for the same.
Considering you are storing the images as a binary & with 1-M mapping: