Database connected()
syntax: |
database.connected() |
return: |
boolean - true if the Database object is currently connected to a data source, false otherwise.
|
description: |
This method returns true if the Database object is currently connected to a database. If connected returns false, reconnect the database before performing any further database actions, otherwise the actions will result in errors.
|
see: |
#link <sedbc>, Database connect(), Database disconnect()
|
example: |
// This example first checks to see // if the database is // connected to a data source. If not, // it connects it to the // database named "CLIENTS" using // the username "ADMIN" and the // password "admin-password" if (!db.connected()) err = db.connect( "ODBC", "CLIENTS", "ADMIN", "admin-passwd" ); |