dbIsOpenError#
Purpose#
Reports whether an error occurred while attempting to open the database connection.
Format#
- ret = dbIsOpenError(db_id)#
- Parameters:
db_id (scalar) – database connection index number.
- Returns:
ret (scalar) – 1 if there was an error or 0 if not.
Examples#
// Add MySQL to the list of database connections
db_id = dbAddDatabase("MYSQL");
dbSetDatabaseName(db_id, "mydb");
// Attempt to open the connection
dbOpen(db_id);
// Check if an error occurred during open
if dbIsOpenError(db_id);
print "Error opening database connection";
endif;