MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 432

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 431
7 Functions — Alphabetical List
7-2
attr
Retrieve attributes of columns in fetched data set
Syntax
attributes = attr(curs)
attributes = attr(curs,colnum)
Description
attributes = attr(curs) retrieves attribute information for all columns in the
fetched data set curs.
attributes = attr(curs,colnum) retrieves attribute information for the column
number colnum in the fetched data set curs.
Examples
Retrieve Attribute Data for a Fetched Data Set
Connect to an Oracle database using an ODBC connection. This code assumes that
you are connecting a data source named dbname with user name username and
password pwd. The data source identifies an Oracle database that contains the table
inventoryTable with these columns: productNumber, Quantity, Price, and
inventoryDate.
conn = database(dbname,username,pwd);
Fetch all the data from the table inventoryTable into a fetched data set curs.
curs = exec(conn,'select * from inventoryTable');
curs = fetch(curs);
Retrieve attribute information for all the fetched data curs.
attributes = attr(curs)
Seitenansicht 431
1 2 ... 427 428 429 430 431 432 433 434 435 436 437 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare