dbIsOpen#
Purpose#
Reports whether a specified database connection is open.
Format#
- ret = dbIsOpen(db_id)#
- Parameters:
db_id (scalar) – database connection index number.
- Returns:
ret (scalar) – 1 if the connection is open or 0 if it is closed.
Examples#
// Add MySQL to the list of database connections
db_id = dbAddDatabase("MYSQL");
dbSetDatabaseName(db_id, "mydb");
// Open the connection
dbOpen(db_id);
// Check if the connection is open
if dbIsOpen(db_id);
print "Connection is open";
endif;