| Database Toolbox™ | ![]() |
ping(conn)
ping(conn) returns status information about the database connection conn if the connection is open. It returns an error message otherwise.
Check the status of the ODBC connection conn.
ping(conn)
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'
Check the status of the JDBC connection conn.
ping(conn)
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'In this example, the database connection conn has been terminated or is not successful. Run:
ping(conn) Cannot Ping the Database Connection
database, dmd, get, isconnection, set, supports
![]() | namecolumn | primarykeys | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |