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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 684
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 670
update
7-241
update
Replace data in database table with MATLAB data
Syntax
update(conn,tablename,colnames,data,whereclause)
Description
update(conn,tablename,colnames,data,whereclause) exports the MATLAB
variable data in its current format into the database table tablename using the
database connection conn. Existing records in the database table are replaced as
specified by the SQL whereclause command.
Examples
Update an Existing Record
Create a database connection conn using the dbtoolboxdemo data source. This
database contains the table inventoryTable that contains these columns:
productNumber
Quantity
Price
inventoryDate
conn = database('dbtoolboxdemo','','');
Import all data from the inventoryTable using conn. Store the data in a cell
array contained in the cursor object property curs.Data. Display the data from
inventoryTable in this property.
curs = exec(conn,'select * from inventoryTable');
curs = fetch(curs);
Vista de pagina 670
1 2 ... 666 667 668 669 670 671 672 673 674 675 676 ... 683 684

Comentarios a estos manuales

Sin comentarios