spec_meta_is_valid
dbIsValid()
returns a logical scalar,
TRUE
if the object specified by dbObj
is valid,
FALSE
otherwise.
A '>DBIConnection object is initially valid,
and becomes invalid after disconnecting with dbDisconnect()
.
A '>DBIResult object is valid after a call to dbSendQuery()
,
and stays valid even after all rows have been fetched;
only clearing it with dbClearResult()
invalidates it.
A '>DBIResult object is also valid after a call to dbSendStatement()
,
and stays valid after querying the number of rows affected;
only clearing it with dbClearResult()
invalidates it.
If the connection to the database system is dropped (e.g., due to
connectivity problems, server failure, etc.), dbIsValid()
should return
FALSE
. This is not tested automatically.