In order for a DBTools.h++ application to interact with a database, an RWDBDatabase instance must be created by calling:
RWDBManager::database(accessLib, serviceName, userName, passWord, "");
All arguments are of type RWCString. For Oracle8, you must provide the following:
accessLib: If you are using DLLs or shared libraries, provide the name of the shared library or DLL; for example, or87d.dll. See the DBTools.h++ Build Guide for information about naming conventions. If you are using a static library, supply the string ORACLE8.
serviceName: Supply the Oracle8 service name for your connection; ask your DBA for assistance.
userName: Supply the user name of a valid Oracle8 user.
passWord: Supply the password for the user.
databaseName: Empty string.
Here are two examples of opening a database in an Oracle8 service. Notice that both require a user name and password to provide the highest level of security. In the first example, the accessLib is defined as ORACLE8, indicating that the application must be linked with the static version of the access library:
RWDBManager::database("ORACLE8", "INHOUSE", "cratchitt", "scrooge", "");
The second example shows how to open the same database from a Windows application. In this case, the accessLib is defined as or87d.dll, which indicates that the application will dynamically load the access library at runtime:
RWDBManager::database("or87d.dll", "INHOUSE", "cratchitt", "scrooge", "");
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.