| Database Toolbox User's Guide | Search  Help Desk |
| querytimeout | Examples See Also |
Get time allowed for database SQL query to succeed
Syntax
timeout = querytimeout(cursor)
Description
timeout = querytimeout(cursor)
gets the amount of time, in seconds, allowed for an SQL query of cursor, which is run using exec, to succeed. 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 forcursorA:
querytimeout(cursorA)
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