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

  • 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 631
7 Functions — Alphabetical List
7-202
1x2 array of cursor objects
The SQL script has two queries, and returns two results when executed.
Display the results for the second query.
results(2)
ans =
Attributes: []
Data: {4x6 cell}
DatabaseObject: [1x1 database]
RowLimit: 0
SQLQuery: [1x309 char]
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]
Display the resultset returned for the second query.
results(2).Data
ans =
'Painting Set' 'Terrific Toys' 'London' [3000] [2400] [1800]
'Victorian Doll' 'Wacky Widgets' 'Adelaide' [1400] [1100] [ 981]
'Sail Boat' 'Incredible Machines' 'Dublin' [3000] [2400] [1500]
'Slinky' 'Doll's Galore' 'London' [3000] [1500] [1000]
Get the column names for the data returned by the second query.
names = columnnames(results(2))
names =
'productDescription','supplierName','city','Jan_Sales','Feb_Sales','Mar_Sales'
Close the cursor array and connection.
close(results)
close(conn)
Run SQL Script in Row Increments
Run SQL commands from a file on a connected data source in two-row increments.
Vue de la page 631
1 2 ... 627 628 629 630 631 632 633 634 635 636 637 ... 683 684

Commentaires sur ces manuels

Pas de commentaire