Omnis Technical Note TNSQ0021 July 2008

Connecting to "Sybase Adaptive Server Anywhere 11" 64-bit Server

For Omnis Studio 4.x
By Gary Ashford

Introduction

This technote complements TNSQ0008: Connecting to Sybase Adaptive Server Anywhere 9
and describes how Omnis Studio can be used to connect to a Windows 64-bit Sybase ASA server either locally or remotely.

To connect to a Sybase ASA Server from Omnis, the procedure is similar to that used to connect to an Adaptive Server Enterprise (ASE) server. The example below assumes that a connection is to be made to the SQL Anywhere 11 Developer Edition which- at time of publishing is available for download from Sybase's website.

After installing ASA developer edition, run the Network Server Sample, or the Personal Server Sample- if only local connections will be required.




Following initialisation, the server accepts shared memory and/or TCP/IP connections on port 2638 by default.
The two ways of connecting to Sybase presented here are:

1. Using the Sybase DAM


To connect using the Sybase DAM, you need to have 32-bit Sybase clientware installed on the client machine (e.g. Open Client 15.0). This is required even if connecting locally from the 64-bit machine since Omnis Studio is a 32-bit application. Edit your interfaces file (either using a text editor or the DSEdit utility if available) and add the following entry:

demo
master tcp ether xxx.xxx.xxx.xxx 2638
query tcp ether xxx.xxx.xxx.xxx 2638


where xxx.xxx.xxx.xxx represents the IP address of the ASA server. If the server is running locally, you can use the word localhost in place of the IP address.
It is important to note that the name chosen for the connection matches the name of a database running on the ASA server, otherwise you will receive an error "Requested server name not found" when attempting to connect. If using DSEdit, you can also "ping" the server to test that the connection details are correct.

From the Omnis SQL Browser, you should then be able to connect to the server using a SYBASEDAM session. The default username and password for the ASA sample are "dba" and "sql" respectively. Specify "demo" as the hostname and leave the database field blank.

2. Using the ODBC DAM

Windows Client - using ASA Win32 ODBC Driver: DBODBC11.DLL

When connecting locally (i.e from the 64-bit machine), you should use the 64-bit ODBC Administrator (can be accessed via the SQL Anywhere 11 Start menu item) and create a System or User datasource specifying the (64-bit) SQL Anywhere 11 ODBC driver.
When connecting remotely (e.g. from a Windows 32-bit machine), you should install the 32-bit SQL Anywhere 11 driver and specify this when creating the datasource.
 
When creating a User or System DSN, the Server name and Database name fields should match those at the server. For the ASA Sample, these are "demo11" (circled above) and "demo" respectively. The name chosen for the ODBC datasource (sybaseanywhere in this example) is arbitrary:


 
If connecting locally, you should specify the Shared memory option (under the Network tab) and leave the TCP/IP details blank. If you will be connecting remotely, you should specify TCP/IP as the network protocol and enter the HOST and PORT details of the remote server (separated by a semi-colon):
 

 
All other settings can be left at their default values.

From the Omnis SQL Browser, you should then be able to connect to the server using an ODBC session. The default username and password for the ASA sample are "dba" and "sql" respectively. Specify the DSN name chosen above as the hostname and leave the database field blank: 

See also

Connecting to Sybase Adaptive Server Anywhere 9 (ASA): TNSQ0008
Connecting to Sybase SQL Anywhere 10 from a Mac-Intel Client: TNSQ0016
Connecting to an Oracle 64-bit Server: TNSQ0020