User`s guide
7 Functions — Alphabetical List
7-222
Example 4 — Set the AutoCommit Flag to Off and Roll Back Data
This example runs update to insert data into a database whose AutoCommit flag is off.
It then uses rollback to roll back the data.
1
Set the AutoCommit flag to off for database connection conn.
set(conn, 'AutoCommit', 'off');
2
Update the data in colnames in the Avg_Freight_Weight table, for the record
selected by whereclause, with data from the cell array exdata.
update(conn, 'Avg_Freight_Weight', colnames, exdata,
whereclause)
3
Roll back the data.
rollback(conn)
The data in the table is now as it was before you ran update.
Example 5 — Set the LoginTimeout for a Drivermanager Object
1
Create a drivermanager object dm using drivermanager. Set the LoginTimeout
value to 3 seconds.
dm = drivermanager;
set(dm,'LoginTimeout',3);
2
Verify this result.
logintimeout
ans =
3
See Also
database | exec | fastinsert | fetch | get | logintimeout | update