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

  • 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 385
6 Using Database Toolbox Functions
6-44
curs = fetch(curs)
curs =
Attributes: []
Data: [3x5 table]
DatabaseObject: [1x1 database]
RowLimit: 0
SQLQuery: '{call getSupplierInfo('New York')}'
Message: []
Type: 'Database Cursor Object'
ResultSet: [1x1 com.microsoft.sqlserver.jdbc.SQLServerResultSet]
Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]
Statement: [1x1 com.microsoft.sqlserver.jdbc.SQLServerStatement]
Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]
curs contains the supplier data from calling the stored procedure, getSupplierInfo,
in table format.
Display the supplier data in table format by accessing the contents of the Data element
of curs.
curs.Data
ans =
SupplierNumber SupplierName City
-------------- ------------------ ----------
1001 'Wonder Products' 'New York'
1006 'ACME Toy Company' 'New York'
1012 'Aunt Jemimas' 'New York'
Country FaxNumber
--------------- --------------
'United States' '212 435 1617'
'United States' '212 435 1618'
'USA' '14678923104'
Close the Database Connection
Close the cursor object and the database connection.
close(curs)
Vue de la page 385
1 2 ... 381 382 383 384 385 386 387 388 389 390 391 ... 683 684

Commentaires sur ces manuels

Pas de commentaire