Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Access Module for PostgreSQL User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

2.2 Databases and Connections

This section describes the arguments used to create an instance of RWDBDatabase for the DB Access module of PostgreSQL. In order for a SourcePro DB application to interact with a database, an RWDBDatabase instance must be created by calling:

All arguments are of type RWCString. These parameters are used to build a connection string which is passed to the libpq function PQconnectdb.

The arguments you must provide to RWDBManager::database() are:

2.2.1 Examples of Opening a Database

Here are two examples of opening a database.

Example 1: Opening a specific database

Notice that the accessLib is defined as POSTGRESQL, indicating that the application will use the static version of the access library and must be linked with it:

Example 2: Opening a database from a Windows application

The second example shows opening the same database from a Windows application. In this case, the accessLib is defined as pgs8015d.dll, indicating that the application will dynamically load the Access Module at runtime:



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.