ASA Database Administration Guide
Connecting to a Database
Any client application that uses a database must establish a connection to that database before any work can be done. The connection forms a channel through which all activity from the client application takes place. For example, your user ID determines permissions to carry out actions on the database—and the database server has your user ID because it is part of the request to establish a connection.
To establish a connection, the client application calls functions in one of the Adaptive Server Anywhere interfaces. Adaptive Server Anywhere provides the following interfaces:
ODBC ODBC connections are discussed in this chapter.
OLE DB OLE DB connections are discussed in this chapter.
Embedded SQL Embedded SQL connections are discussed in this chapter.
Sybase Open Client Open Client connections are not discussed in this chapter.
For information on connecting from Open Client applications, see Adaptive Server Anywhere as an Open Server.
JDBC Sybase Central and Interactive SQL have the connection logic described in this chapter built into them. Other JDBC applications cannot use the connection logic discussed in this chapter.
For more information on connecting via JDBC, see JDBC Programming.
The interface uses connection information included in the call from the client application, perhaps together with information held on disk in a file data source, to locate and connect to a server running the required database. The following figure is a simplified representation of the pieces involved.
The following table identifies where you can find answers to questions.
If you want... | Consider reading... |
---|---|
An overview of connecting from Sybase Central or Interactive SQL (including a description of the drivers involved) | Connecting from Sybase Central or Interactive SQL |
Some examples to get started quickly, including Sybase Central and Interactive SQL scenarios | Simple connection examples |
To learn about data sources | Working with ODBC data sources |
To learn what connection parameters are available | Connection parameters |
To see an in-depth description of how connections are established | Troubleshooting connections |
To learn about network-specific connection issues | Client/Server Communications |
To learn about character set issues affecting connections | Connection strings and character sets |
How connection parameters work
Connection parameters passed as connection strings
Saving connection parameters in ODBC data sources