dbIsValid#

Purpose#

Reports whether a specified database connection has a valid driver.

Format#

ret = dbIsValid(db_id)#
Parameters:

db_id (scalar) – database connection index number.

Returns:

ret (scalar) – 1 if the database connection has a valid driver or 0 if not.

Examples#

// Use default connection
db_id = dbAddDatabase("SQLITE");
ret = dbIsValid(db_id);       // Returns 1 for 'true'

db_id = dbAddDatabase("BAD_DRIVER_NAME");
ret = dbIsValid(db_id);   // Returns 0 for 'false'