First, I hope this is the right place for posting this discussion, as I've searched and searched and couldn't find any specific 'Places' for Mobilink or Ultralite... The issue I'll be asking about involves a rather old version of Mobillink and Ultralite (v9.0.2.3924), so I really hope someone has some comments that might help.
This problem pertains to the following Mobilink error message when synchronizing mobile devices containing an Ultralite remote database which has been restored from a backup file (.bak copied to .udb): "Error [-10023] The remote database may have been restored from backup, or perhaps user name 'XYZ' is being used by different remote databases. Set ml_user.commit_state to zero to re-enable synchronizations for this user."
The remote database on the mobile device has indeed been "backed-up and restored" by the mobile application. It simply closes the database and copies the .udb file to another filename with a .bak extension, and then, if the user ever needs to, or the mobile application detects that the current database is corrupt, it can be restored from the backup file, which simply deletes the current database and copies the .bak file to the originally named .udb file. However, we always receive the error message (-10023 noted above) from the Mobilink Server whenever we perform a synchronization operation when using a restored database. I've seen some postings indicating that there's some kind of "internal sequence number or key" in the remote database which is applied during synchronization to determine if the database has been restored, but I've been unable to find answers to the following questions:
- How does a mobile application "properly" backup and restore a remote database (.udb) file, in-case of corruption, to where Mobilink will not generate this error message?
- Can we somehow, obtain the "internal sequence number or key" from the current database (even if it's by opening the file in binary-mode and seeking to a byte position) and then use that value to overwrite the one in the backup (.bak) file so when it's restored the Mobilink Server won't notice it during synchronization?
- Are there any methods to trap and automatically handle this synchronization error [-10023] on the Mobilink Server? Like "somehow" trap this error and execute a stored procedure in the appropriate Consolidated database (Oracle) so that ml_user.commit_state gets set to zero for the user mentioned?
Just looking for ANY kind of solution, and unfortunately, at this time, we do not have the luxury of being able to upgrade to the latest-and-greatest version of Sybase/SQL Anywhere/Mobilink/Ultralite; so that won't be an option.
Any assistance would be greatly appreciated!
Thank you for your time.