Runtime requirements for synchronization on remote machines

Support files required on remote machine

If you do not install PowerBuilder or ASA on remote machines, you must copy the files listed in Table 13-1 to use MobiLink synchronization with a PowerBuilder application. These files must be copied to the system path on the remote machine or the directory where you copy your PowerBuilder applications.

Table 13-1: Required runtime files on system path of remote machine

Required files

Description

PBVM105.DLL, PBDWE105.DLL, PBSHR105.DLL, PBODB105.DLL, PBODB105.INI, LIBJCC.DLL, LIBJUTILS.DLL

PowerBuilder files that you can copy from the Shared\PowerBuilder directory of the development machine.

ATL71.DLL, GDIPLUS.DLL, MSVCP71.DLL, MSVCR71.DLL

Microsoft files that ship with PowerBuilder. For restrictions on distributing these files with client applications, see the PowerBuilder Release Bulletin.

DBENG9.EXE, DBMLSYNC.EXE, DBSERV9.DLL, DBTOOL9.DLL, DBODBC9.DLL, DBMLSOCK.DLL, DBLIB9.DLL, DBGEN9.DLL, DBCON9.DLL, DBCTRS.DLL

ASA and MobiLink files that you can copy from the Sybase\SQL Anywhere 9\win32 directory of the development machine. You should copy these files to a “win32” subdirectory of the location where you copy the PowerBuilder application and supporting runtime files.

Registry requirements for a remote machine

If you install ASA on all remote machines that you use with MobiLink synchronization, the required registry entries are assigned automatically. If you copy ASA and MobiLink files to a remote machine, you must create the HKEY_CURRENT_USER\SOFTWARE\Sybase\Adaptive Server Anywhere\9.0 registry key and add a “Location” string value that points to the parent directory of the win32 subdirectory where you copied ASA and MobiLink files. (The code in the uf_runsync function of the nvo_appname_sync user object appends “\win32\dbmlsync.exe” to the path that you assign to this registry value.)

Objects generated by the MobiLink Synchronization wizard also require registry entries to define the ODBC data source for a remote ASA connection. Table 13-2 lists the required registry entries. You can create a REG file that installs these registry entries.

Table 13-2: Required registry entries on remote machine

Registry key

Name of string value and data to assign it

HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBCINST.INI\Adaptive Server Anywhere 9.0

Driver = full path to DBODBC9.DLL Setup = full path to DBODBC9.DLL

HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBCINST.INI\ODBC Drivers

Adaptive Server Anywhere 9.0 = “Installed”

HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBC.INI\ODBC Data Sources

dataSourceName = “Adaptive Server Anywhere 9.0”

HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBC.INI\dataSourceName

Driver = full path to DBODBC9.DLL Userid = user name for remote database Password = password for remote    database DatabaseName = remoteDatabaseName DatabaseFile = full path to remote    database ServerName = remoteDatabaseName Start = “dbeng9 -c 8M” CommLinks = “shmem”

Using a file DSN instead of a registry DSN

You can change the uf_runsync function of the nvo_appname_sync user object generated by the MobiLink Synchronization wizard to use a file data source name (DSN) file instead of a registry DSN. To do this, you must change “dsn=” to “filedsn=” in the following line of code:

connect_string = " -c ~"dsn=" + is_desktop_dsn 

If you are using a file DSN, you must change this line to:

connect_string = " -c ~"filedsn=" + is_desktop_dsn 

For MobiLink synchronization using a file DSN, the is_desktop_dsn instance variable in the nvo_appname_sync user object must include the full path to the file DSN. The following is an example of the contents of a valid file DSN:

[ODBC]
DRIVER=Adaptive Server Anywhere 9.0
UID=dba
Password=sql
Compress=NO
DisableMultiRowFetch=NO
Debug=NO
Integrated=No
AutoStop=YES
Start=dbeng9 -c 8M
EngineName=SalesDB_Remote
DBN=SalesDB_Remote
DatabaseFile=C:\PB10apps\salesdb\salesdb_remote.db