Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

2.13 Contents of RWDBEnvironmentHandle

The access library for the Sybase DB-Library returns an environment handle of type RWDBSybDbLibEnvironmentHandle. This handle provides methods that an application can use to set or retrieve certain connect time and configuration parameters. The available applications are described in Section 2.13.1 to Section 2.13.13.

Please note that some connect time parameters are set only when a connection is established with the SQL server. When the method returns a valid RWDBStatus for these parameters, it does not necessarily mean that the connection parameter has been accepted by the server. Appropriate error messages will be fielded to the application only when a connection is established.

2.13.1 Login Timeout

The loginTimeout() method defines the length of time in seconds that the Sybase DB-Library waits for a login response when making a connection attempt. Two loginTimout() methods are available:

According to the Sybase DB-Library manual, the default value is 60 seconds.

2.13.2 Timeout

The timeout() method defines the length of time in seconds that the Sybase DB-Library waits for a server response when making a request. Two timeout() methods are available:

According to the Sybase DB-Library manual, the default is an infinite timeout period. The application can set this value at any time. It takes effect for all open connections immediately upon being called.

2.13.3 Default Language

The defaultLanguage method defines the national language to use. Two defaultLanguage() methods are available:

In the Sybase DB-Library manual, the default language is us_english. The default is set using the dbsetdflang() method of the Sybase DB-Library.

2.13.4 National Language

Similar to the defaultLanguage method, the nationalLanguage method also defines the national language to use. Two nationalLanguage() methods are available:

In the Sybase DB-Library, national language is set for a particular connection using DBSETLNATLANG(). For DBSETLNATLANG() to take effect, it must be called before an RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the semantics of setting national language using DBSETLNATLANG().

2.13.5 Interfaces File

The interfacesFile method defines the names of the interfaces files that are searched by the DB-Library during every call to dbopen. Two interfacesFile methods are available:

The access library makes a call to dbopen each time a new RWDBConnection is allocated. Refer to the Sybase DB-Library manuals for information on the default behavior.

2.13.6 Client Character Set

The clientCharacterset method defines the client character set which gets passed to the DB-Library when an RWDBConnection is obtained. Two clientCharacterset methods are available:

For the method to take effect, it must be called before the RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the semantics of changing a client character set.

2.13.7 Application Name

The applicationName method defines the application name that gets passed to the DB-Library when an RWDBConnection is obtained. Two applicationName methods are available:

To take effect, the method must be called before the RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the semantics of setting an application name.

2.13.8 Host Name

The hostName method defines the host name that gets passed to the DB-Library when an RWDBConnection is obtained. Two hostName methods are available:

To take effect, the method must be called before the RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the semantics of setting host names.

2.13.9 Maximum Processes

The maximumProcs method defines the maximum limit on simultaneously open DBPROCESSes for an application. Two maximumProcs methods are available:

Each RWDBConnection is associated with a unique DBPROCESS.

2.13.10 Packet Size

The packetSize method defines the TDS packet size that gets passed to the DB-Library when an RWDBConnection is obtained. Two packetSize() methods are available:

To take effect, the method must be called before the RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the semantics of setting TDS packet sizes.

2.13.11 Encrypt

The encrypt method defines whether or not network password encryption is to be used when logging into a Sybase 10.0+ SQL server. Two encrypt() methods are available:

Setting the method to TRUE enables password encryption. To take effect, the method must be called before an RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the semantics of setting password encryption.

2.13.12 Enable Security

Setting the enableSecurity() method to TRUE specifies that login security labels are used for logging into a Secure SQL server. Two enableSecurity methods are available:

If an application enables secured login, it must subsequently set security labels using securityLabel(). An application cannot enable secured login without setting security labels. To take effect, the enableSecurity(TRUE) must be called before an RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the complete semantics of enabling secured logins.

2.13.13 Security Labels

The securityLabels method sets login security labels for logging into a Secure SQL server.

The first parameter defines the label name and the second parameter defines the label value. To take effect, the method must be called before an RWDBConnection is obtained. Refer to the Sybase DB-Library manual for the detailed semantics of label name, label value, and enabling secured logins.

2.13.14 Foreign Keys from Views

The access library for Sybase DB-Library has not implemented the virtual functions:

foreignKeysFromView() and foreignKeysFromView(RWBoolean value).

Both functions are therefore no-ops which return false.

2.13.15 Using RWDBSybDbLibEnvironmentHandle

The following example shows how to gain access to the RWDBSybDbLibEnvironmentHandle. Note that the application must be compiled with an include path to the Sybase DB-Library include files.



Previous fileTop of DocumentContentsIndexNext file

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