MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 556

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 555
7 Functions — Alphabetical List
7-126
supplierNumber
unitCost
productDescription
conn = database.ODBCConnection('dbtoolboxdemo','admin','admin')
conn =
ODBCConnection with properties:
Instance: 'dbtoolboxdemo'
UserName: 'admin'
Message: []
Handle: [1x1 database.internal.ODBCConnectHandle]
TimeOut: 0
AutoCommit: 0
Type: 'ODBCConnection Object'
conn has an empty Message property, which means a successful connection.
Select and display the data from the productTable.
curs = exec(conn,'select * from productTable');
curs = fetch(curs);
curs.Data
ans =
productNumber stockNumber supplierNumber unitCost productDescription
------------- ----------- -------------- -------- ------------------
...
6 400876 1004 8 'Sail Boat'
3 400999 1009 17 'Slinky'
10 888652 1006 24 'Teddy Bear'
Store the column names of productTable in a cell array.
tablename = 'productTable';
colnames = {'productNumber','stockNumber','supplierNumber',...
'unitCost','productDescription'};
Store the data for the insert in the cell array data that contains these values:
productNumber equal to 11
stockNumber equal to 500565
supplierNumber equal to 1010
Vedere la pagina 555
1 2 ... 551 552 553 554 555 556 557 558 559 560 561 ... 683 684

Commenti su questo manuale

Nessun commento