Connecting To Sybase ASA


This section explains how to connect to the Sybase ASA database using methods as Sybase Central and ODBC.
It also describes how to change the port sybase listens on.  By default Sybase ASA listens on port 2638.


Changing the port on which the database server listens

Use the option: -x "tcpip(ServerPort ={PORT_NUMBER})"
Example:
    "C:\Program Files\Sybase\SQL Anywhere 8\win32\dbeng8.exe" -c 8m    -x "tcpip(ServerPort=12345)" "C:\Program Files\Sybase\SQL Anywhere 8\tma_dev.db"

Connecting to a Remote Server

Using Sybase Central & Interactive SQL

For the field "Server name" specify {ip_address}:{port_number}
Example: 11.22.33.44:2638
Also, enter the username and password.

How to Connect to the TMAJ database Using Microsoft Access


This will guide you through creating an ODBC data source so that you can access
TMAJ through Microsoft Access.

Note: You must have installed Sybase SQL Anywhere on your computer at some point.  This is
because you need the ODBC driver.

1) Start Button -> Control Panel -> Administrative Tools -> Data Sources (ODBC) -> User DSN Tab
2) Click the Add Button
3) Select the Adaptive Server Anywhere 8.0 driver.  (If you don't see this driver, it means you haven't installed Sybase SQL Anywhere on your machine. )
If you can see the Adaptive Server Anywhere 8.0 driver, installing SQL Anywhere isn't necessary.
4) Choose these options to configure the driver:

ODBC Tab
Login Tab
Database Tab

Network Tab


5) Once you have entered all this information, go back to the ODBC Tab and hit
the "Test Connection" button.  If you did everything right you should get a
"Connection Successful" message.

6) Create a new Microsoft Access Database
7) Go to the Menu, then INSERT -> TABLE
8) Choose either Link Table or Import Table.
 Importing the table will make a COPY of the database (so you could take it off campus)
 while Linking the table will actually link to TMAJ. (With the link option,
 as TMAJ gets updated, you will see it in the Access Database.)
9) Under "Files of Type" choose "ODBC Sources".  A Select Data Source window
should come up.
10) Go the the Machine Data Source Tab and choose tmaj_jhu_production.
11) Select all the tables and hit okay

© Copyright 2006 | All Rights Reserved | The Johns Hopkins University