Database Toolbox | ![]() ![]() |
Get time allowed for a database SQL query to succeed
Syntax
timeout = querytimeout(curs)
Description
timeout = querytimeout(curs)
returns the amount of time, in seconds, allowed for an SQL query of curs
to succeed, where curs
is created by running exec
. If a query cannot be completed in the allowed time, MATLAB stops trying to perform the exec
. The timeout value is defined for a database by the database administrator. If the timeout value is zero, a query must be completed immediately.
Examples
Get the current database timeout setting for curs
.
querytimeout(curs) ans = 10
Limitations
If a database does not have a database timeout feature, MATLAB returns
[Driver
]Driver not capable
The Microsoft Access ODBC driver and Oracle ODBC driver do not support querytimeout
.
See Also
exec
![]() | querybuilder | register | ![]() |