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

  • 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 465
7 Functions — Alphabetical List
7-36
Statement: [1x1 database.internal.ODBCStatementHandle]
With the native ODBC interface, curs returns an ODBCCursor Object instead of a
Database Cursor Object.
View the contents of the Data element in the cursor object.
curs.Data
ans =
'Victorian Doll'
'Train Set'
'Engine Kit'
'Painting Set'
'Space Cruiser'
'Building Blocks'
'Tin Soldier'
'Sail Boat'
'Slinky'
'Teddy Bear'
Close the cursor object.
close(curs)
Import All Rows of Data
Working with the dbtoolboxdemo data source, use exec to select data in column City,
for example, in 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 field 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]
Vue de la page 465
1 2 ... 461 462 463 464 465 466 467 468 469 470 471 ... 683 684

Commentaires sur ces manuels

Pas de commentaire