User`s guide

set
7-219
Property Value Description
set, fetch behaves differently depending
on what type of database you are using.
Drivermanager Objects
The allowable property and value for a drivermanager object appear in the following
table.
Property Value Description
'LoginTimeout' positive integer Sets the logintimeout value
for all loaded database drivers.
For command-line help on set, use the overloaded methods:
help cursor/set
help database/set
help drivermanager/set
Examples
Example 1 — Set RowLimit for Cursor
This example does the following:
Establishes a JDBC connection to a data source.
Runs fetch to retrieve data from the table EMP.
Sets RowLimit to 5.
conn = database('orcl','scott','tiger',...
'oracle.jdbc.driver.OracleDriver',...
'jdbc:oracle:thin:@144.212.123.24:1822:');
curs = exec(conn,'select * from EMP');
set(curs,'RowLimit',5)
curs = fetch(curs)
curs =
Attributes: []
Data: {5x8 cell}
DatabaseObject: [1x1 database]
RowLimit: 5