MATLAB DATABASE TOOLBOX RELEASE NOTES Guide de l'utilisateur Page 571

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 684
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 570
fetch
7-141
ans =
'Victorian Doll'
'Train Set'
'Engine Kit'
'Painting Set'
'Space Cruiser'
'Building Blocks'
'Tin Soldier'
'Sail Boat'
'Slinky'
'Teddy Bear'
After finishing with the cursor object, close it.
close(curs)
Import All Data Using the Cursor Object
Working with the dbtoolboxdemo data source, use exec to select data in column City
in the table suppliers. Then, use fetch to import all data from the SQL statement into
the cursor object curs, and store the data in a cell array contained in the cursor object
property curs.Data.
curs = exec(conn,'select City from suppliers');
curs = fetch(curs)
curs =
Attributes: []
Data: {10x1 cell}
DatabaseObject: [1x1 database]
RowLimit: 0
SQLQuery: 'select City from suppliers'
Message: []
Type: 'Database Cursor Object'
ResultSet: [1x1 sun.jdbc.odbc.JdbcOdbcResultSet]
Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]
Statement: [1x1 sun.jdbc.odbc.JdbcOdbcStatement]
Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]
View the contents of the Data element in the cursor object.
curs.Data
ans =
'New York'
Vue de la page 570
1 2 ... 566 567 568 569 570 571 572 573 574 575 576 ... 683 684

Commentaires sur ces manuels

Pas de commentaire