Next Previous Up Top Contents Index

1 The SQL-ODBC Library

1.2 Connecting to a database

Before it can query a database, your application must connect to it. Most DBMSes operate a form of login procedure to verify connections, using a user name and password for the purpose. The popular DBMSes each have different protocols for identifying themselves, their users, their databases, and connections to those databases.

The SQL-ODBC library provides a general-purpose connection protocol that is not specific to any DBMS, and represents DBMSes, databases, database connections, user names and passwords with generic Dylan classes, thereby hiding the idiosyncrasies of the various DBMSes from Dylan applications. The classes that the SQL-ODBC library defines are shown in Table 1.4.

Table 1.4 Dylan DBMS classes.

Entity

Abstract Dylan class

SQL-ODBC class

DBMS

<dbms>

<odbc-dbms>

Database

<database>

<odbc-database>

User name and password

<user>

<odbc-user>

Active connection

<connection>

<odbc-connection>

You should create DBMS-specific instances of these classes to connect to a database.

1.2.1 - The <DBMS> class
<dbms>
1.2.2 - The <USER> class
<user>
1.2.3 - The <DATABASE> class
<database>
1.2.4 - The <CONNECTION> class
<connection>
1.2.5 - Connection protocol functions, methods, and macros
1.2.6 - Connecting and disconnecting
with-database

OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index