If you do not install PowerBuilder or SQL Anywhere 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.
Required files |
Description |
---|---|
PBDPL120.DLL, PBVM120.DLL, PBDWE120.DLL, PBSHR120.DLL, PBODB120.DLL, PBODB120.INI, LIBJCC.DLL, LIBJUTILS.DLL |
PowerBuilder files that you can copy from the Shared\PowerBuilder directory of the development machine. |
GDIPLUS.DLL, MSVCP71.DLL, MSVCR71.DLL |
Microsoft files that ship with PowerBuilder. For restrictions on distributing these files with client applications, see “Microsoft files”. |
DBENG11.EXE, DBMLSYNC.EXE, DBSERV11.DLL, DBTOOL11.DLL, DBODBC11.DLL, DBLIB11.DLL, DBLGEN11.DLL, DBCON11.DLL, DBCTRS11.DLL, DBICU11.DLL, DBICUDT11.DLL |
SQL Anywhere and MobiLink files that you can copy from the Sybase\SQL Anywhere 11\bin32 (or bins64) directory of the development machine. You should copy these files to a “bin32” subdirectory of the location where you copy the PowerBuilder application and supporting runtime files. |
If you install SQL Anywhere on all remote machines that you use with MobiLink synchronization, the required registry entries are assigned automatically. If you copy SQL Anywhere and MobiLink files to a remote machine, you must create the HKEY_CURRENT_USER\SOFTWARE\Sybase\SQL Anywhere\11.0 registry key and add a “Location” string value that points to the parent directory of the bin32 or bin64 subdirectory where you copied SQL Anywhere and MobiLink files. (The code in the uf_runsync function of the nvo_appname_sync user object appends “\bin32\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 SQL Anywhere connection. Table 13-2 lists the required registry entries. You can create a REG file that installs these registry entries.
Registry key |
Name of string value and data to assign it |
---|---|
HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBCINST.INI\SQL Anywhere 11.0 |
Driver = full path to DBODBC11.DLL Setup = full path to DBODBC11.DLL |
HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBCINST.INI\ODBC Drivers |
SQL Anywhere 11.0 = “Installed” |
HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBC.INI\ODBC Data Sources |
dataSourceName = “SQL Anywhere 11.0” |
HKEY_LOCAL_MACHINE\SOFTWARE\ ODBC\ODBC.INI\dataSourceName |
Driver = full path to DBODBC11.DLL Userid = user name for remote database Password = password for remote database DatabaseName = remoteDatabaseName DatabaseFile = full path to remote database ServerName = remoteDatabaseName Start = “dbeng11 -c 8M” CommLinks = “shmem” |
You can use a file DSN or a registry DSN for your remote database connections. To avoid having to specify a fully qualified path, you can copy file DSNs to a path specified by the ODBC registry key (typically c:\program files\common files\ODBC\data sources).
The following is an example of the contents of a valid file DSN:
[ODBC] DRIVER=SQL Anywhere 11.0 UID=dba Compress=NO AutoStop=YES Start=dbeng11 -c 8M -zl -ti 0 EngineName=SalesDB_Remote DBN=SalesDB_Remote DatabaseFile=C:\work\salesdb\salesdb_remote.db DatabaseName=SalesDB_remote
The Datasource property of the MLSync object distinguishes a file DSN from a registry DSN using these rules:
If the Datasource name ends with a .dsn file extension, it is a file DSN
If the Datasource name begins with “drive:\
” prefix
where drive is any alphabetic character, then
it is a file DSN
File DSN location before EBFs are applied to older
DBMS versions
If you have not applied the latest EBFs to SQL Anywhere 10.0.0 or Adaptive Server
Anywhere 9, dbmlsync looks in the current directory
for file DSNs when a full path is not specified—not in
the path specified by the ODBC registry key. The registry key is
used by SQL Anywhere 10.0.1
and later to locate file DSNs when their paths are not fully qualified.