| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Database Toolbox |
| Contents | Index |
| Learn more about Database Toolbox |
timeout = logintimeout('driver',
time)
timeout = logintimeout(time)
timeout = logintimeout('driver')
timeout = logintimeout
timeout = logintimeout('driver', time) sets the amount of time, in seconds, for a MATLAB software session to connect to a database via a given JDBC driver. Use logintimeout before running the database function. If the MATLAB software session cannot connect to the database within the specified time, it stops trying.
timeout = logintimeout(time) sets the amount of time, in seconds, allowed for a MATLAB software session to try to connect to a database via an ODBC connection. Use logintimeout before running the database function. If the MATLAB software session cannot connect within the allowed time, it stops trying.
timeout = logintimeout('driver') returns the time, in seconds, that was previously specified for the JDBC driver. A returned value of 0 means that the timeout value was not previously set. The MATLAB software session stops trying to connect to the database if it is not immediately successful.
timeout = logintimeout returns the time, in seconds, that you previously specified for an ODBC connection. A returned value of 0 means that the timeout value was not previously set ; the MATLAB software session stops trying to make a connection if it is not immediately successful.
Note If you do not specify a value for logintimeout and the MATLAB software session cannot establish a database connection, your MATLAB software session may freeze. |
View the current connection timeout value.
logintimeout
ans =
0
This indicates that you have not specified a timeout value.
Set the timeout value to 5 seconds.
logintimeout(5)
ans =
5
Check the timeout value for a database connection that is established using an Oracle JDBC driver.
logintimeout('oracle.jdbc.driver.OracleDriver')
ans =
0
This indicates that the timeout value is currently 0.
Set the timeout to 5 seconds.
timeout = ...
logintimeout('oracle.jdbc.driver.OracleDriver', 5)
timeout =
5
Verify the timeout value.
logintimeout('oracle.jdbc.driver.OracleDriver')
ans =
5
![]() | isurl | namecolumn | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |