MobiLink Synchronization Reference
MobiLink Synchronization Server Options
MobiLink synchronization server
dbmlsrv9 options
For columns of type VARCHAR, CHAR, LONG VARCHAR, or LONG CHAR, removes trailing blanks from strings during synchronization.
dbmlsrv9 -c "connection-string" -b ...
This option is intended to help resolve differences between the Adaptive Server Anywhere CHAR data type and the CHAR or VARCHAR data type used by the consolidated database. The Adaptive Server Anywhere CHAR data type is equivalent to VARCHAR. However, in most consolidated databases that are not Adaptive Server Anywhere, the CHAR(n) data type is blank-padded to n characters.
When -b is specified, the MobiLink synchronization server removes trailing blanks from strings for columns of type CHAR, VARCHAR, LONG CHAR, or LONG VARCHAR if the column on the remote is a string. It does this before filtering rows that were uploaded in the current synchronization. The trimmed data is then downloaded to the remote databases.
This option can also be used to detect conflict updates. For each upload update row, the MobiLink synchronization server fetches the row from the consolidated database for the given primary key, compares the row with the pre-image of the update, and then determines whether the update is a conflict update. When -b is used, MobiLink trims trailing blanks from columns of type CHAR, VARCHAR, LONG CHAR, or LONG VARCHAR before doing the comparison.
If the -b option is not used, a primary-key value of 'abc' uploaded from an Adaptive Server Anywhere or UltraLite remote to a CHAR(10) column in the consolidated database will become 'abc' followed by seven blank spaces. If the same row is downloaded, then it will appear on the remote as 'abc' followed by seven spaces. If the remote database is not blank-padded, then the remote will now have two rows: both 'abc' and 'abc' followed by seven spaces. There is now a duplicate row on the remote.
If the -b option is used, a primary-key value of 'abc' uploaded from an Adaptive Server Anywhere or UltraLite remote to a CHAR(10) column in the consolidated database will become 'abc' followed by seven spaces. Seven spaces still pad the value to ten characters, but if the same row is downloaded, then MobiLink server will strip the trailing spaces, and the value will appear on the remote as 'abc'. The -b option thus fixes the duplicate row problem.