Database Toolbox |
Get status information about database connection
Syntax
Description
ping(
returns the status information about the database connection, conn
)
conn
. If the connection is open, ping
returns status information and otherwise it returns an error message.
Example 1--Get Status Information About ODBC Connection
where conn
is a valid ODBC connection. MATLAB returns
ans =
DatabaseProductName: 'ACCESS'
DatabaseProductVersion: '03.50.0000'
JDBCDriverName: 'JDBC-ODBC Bridge (odbcjt32.dll)'
JDBCDriverVersion: '1.1001 (04.00.4202)'
MaxDatabaseConnections: 64
CurrentUserName: 'admin'
DatabaseURL: 'jdbc:odbc:SampleDB'
AutoCommitTransactions: 'True'
Example 2--Get Status Information About JDBC Connection
where conn
is a valid JDBC connection.
ans = DatabaseProductName: 'Oracle' DatabaseProductVersion: [1x166 char] JDBCDriverName: 'Oracle JDBC driver' JDBCDriverVersion: '7.3.4.0.2' MaxDatabaseConnections: 0 CurrentUserName: 'scott' DatabaseURL: 'jdbc:oracle:thin:... @144.212.123.24:1822:orcl' AutoCommitTransactions: 'True'
Example 3--Unsuccessful Request for Information About Connection
where the database connection conn
has been terminated or was not successful. MATLAB returns
See Also
database
, dmd
, get
, isconnection
, set
, supports
namecolumn | primarykeys |
© 1994-2005 The MathWorks, Inc.