Connecting Apama Applications to External Components > Using Standard Adapters > Using the Apama Database Connector > The ADBCHelper Application Programming Interface > Checking to see if a database is open
Checking to see if a database is open
Checking to see whether the database is already open or is in the process of being opened before calling an open event action is optional, but it is good programming practice. An application may also want to check if a database is open before executing a query.
The following example checks these fields to ensure that the application does not try to open an already opened database.
com.apama.database.DBUtil db;
//...
if not db.isOpen then {
db.openQuickODBC(dbUrl,””,””,handleError );
}
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.