MATLAB DATABASE TOOLBOX RELEASE NOTES Guía de usuario Pagina 652

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 684
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 651
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
Vista de pagina 651
1 2 ... 647 648 649 650 651 652 653 654 655 656 657 ... 683 684

Comentarios a estos manuales

Sin comentarios