spec_meta_is_valid
Value
dbIsValid()
returns a logical scalar,
TRUE
if the object specified by dbObj
is valid,
FALSE
otherwise.
A DBI::DBIConnection object is initially valid,
and becomes invalid after disconnecting with DBI::dbDisconnect()
.
For an invalid connection object (e.g., for some drivers if the object
is saved to a file and then restored), the method also returns FALSE
.
A DBI::DBIResult object is valid after a call to DBI::dbSendQuery()
,
and stays valid even after all rows have been fetched;
only clearing it with DBI::dbClearResult()
invalidates it.
A DBI::DBIResult object is also valid after a call to DBI::dbSendStatement()
,
and stays valid after querying the number of rows affected;
only clearing it with DBI::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.
See also
Other meta specifications:
spec_get_info
,
spec_meta_bind
,
spec_meta_column_info
,
spec_meta_get_row_count
,
spec_meta_get_rows_affected
,
spec_meta_get_statement
,
spec_meta_has_completed