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

2.2 Databases and Connections

This section describes the arguments used to build a connect string to a MySQL database. 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 passed to the MySQL C API function mysql_real_connect().

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

Example 1: Opening a database

Here are two examples of opening a database.

The first example accesses a MySQL Server database using a shared build of the Access Module. A user name and password are provided. Notice that accessLib is defined as "mys8015d.dll", indicating that the application will dynamically load the Access Module at runtime:

The second example accesses MySQL Server using a static build of the Access Module. Notice that accessLib is defined as "MYSQL", indicating that the application will use the static version of the Access Module:



Previous fileTop of DocumentContentsIndex pageNext 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.
Contact Rogue Wave about documentation or support issues.