Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

2.1 Databases and Connections

This section describes the arguments required to create an RWDBDatabase instance for DB-Library. In order for a DBTools.h++ application to open and use the connections required for interacting with a database, you must first create an RWDBDatabase instance by calling

All arguments are of type RWCString. For DB-Library, you must provide the following arguments:

Here are three examples of opening a database on a specific SQL server, INHOUSE.

The first example opens a specific database, ACCOUNTING. Both a user name and a password are given to provide the highest level of security. Notice that the accessLib is defined as SYBASE, indicating that the application must be linked with the static version of the access library:

The second example shows how to open the same database from a Windows application. In this case, the accessLib is defined as sdb4d.dll, indicating that the application will dynamically load (DLL) the access library at runtime:

The final example shows how to open a user's default database, which is the database assigned to the user by the database administrator. In this case, the application will use the access library as an Unix shared library at runtime:

The library name and path shown are for Solaris.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.