August 1999
Intermediate to advanced
1488 pages
72h 53m
English
DbPool.majorErrorMessage()
The majorErrorMessage() method of the DbPool object contains the ODBC or database string error message that is returned if an error occurs.
Listing 8.62 shows how you would create a pool of connections and test for the connection. If the test fails, the majorErrorMessage() method is used to write the error to the page.
<SERVER> // Create a pool of connections var myPool = new DbPool("ORACLE", "mySID", "myApp", "appsPWD", "myTNS"); if (myPool.connected()) { // You are connected, so perform any tasks here }else{ // There was an error connecting to the database write('Error ('+myPool.majorErrorCode()+'): ... |
Read now
Unlock full access