MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 582

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 581
7 Functions — Alphabetical List
7-152
fetchmulti
Import data from multiple resultsets
Syntax
curs = fetchmulti(curs)
Description
curs = fetchmulti(curs) imports data from the open SQL cursor object curs into
the object curs, where the open SQL cursor object contains multiple resultsets.
Multiple resultsets are retrieved via exec with a sqlquery statement that runs a stored
procedure consisting of two select statements.
cursmulti.Data contains data from each resultset associated with
cursmulti.Statement. cursmulti.Data is a cell array consisting of cell arrays,
structures, or numeric matrices as specified in setdbprefs; the data type is the same
for all resultsets.
Examples
Use exec to run a stored procedure that includes multiple select statements and
fetchmulti to retrieve the resulting multiple resultsets.
conn = database(...)
setdbprefs('DataReturnFormat','cellarray')
curs = exec(conn, '{call sp_1}');
curs = fetchmulti(curs)
Attributes: []
Data: {{10x1 cell} {12x4 cell}}
DatabaseObject: [1x1 database]
RowLimit: 0
SQLQuery: '{call sp_1}'
Message: []
Type: 'Database Cursor Object'
Seitenansicht 581
1 2 ... 577 578 579 580 581 582 583 584 585 586 587 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare