MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 447

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 446
columnnames
7-17
'SupplierNumber','SupplierName','City','Country','FaxNumber'
columnlist contains one long string with the column names in the suppliers table in
quotes and separated by commas.
After finishing with the cursor object, close it.
close(curs)
Close the database connection.
close(conn)
Return Column Names as a Cell Array
Create a database connection conn using the dbtoolboxdemo data source.
conn = database('dbtoolboxdemo','','');
Working with the dbtoolboxdemo data source, use fetch to import all data into
Database Cursor Object curs. Store the data in a cell array contained in the cursor
object field curs.Data.
curs = exec(conn,'select * from productTable');
curs = fetch(curs);
Return the column names in the suppliers table as a cell array.
columnlist = columnnames(curs,true)
columnlist =
'SupplierNumber'
'SupplierName'
'City'
'Country'
'FaxNumber'
columnlist contains a cell array of the column names in the suppliers table. The cell
array has five rows for each column name.
After finishing with the cursor object, close it.
close(curs)
Close the database connection.
Vedere la pagina 446
1 2 ... 442 443 444 445 446 447 448 449 450 451 452 ... 683 684

Commenti su questo manuale

Nessun commento