MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 557

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 556
fastinsert
7-127
unitCost equal to $20
productDescription equal to 'Cooking Set'
Then, convert the cell array to the table data_table.
data = {11,500565,1010,20,'Cooking Set'};
data_table = cell2table(data,'VariableNames',colnames)
data_table =
productNumber stockNumber supplierNumber unitCost productDescription
------------- ----------- -------------- -------- ------------------
11 500565 1010 20 'Cooking Set'
Insert the table data into the productTable.
fastinsert(conn,tablename,colnames,data_table)
Display the data from the productTable again.
curs = exec(conn,'select * from productTable');
curs = fetch(curs);
curs.Data
ans =
productNumber stockNumber supplierNumber unitCost productDescription
------------- ----------- -------------- -------- ------------------
...
3 400999 1009 17 'Slinky'
10 888652 1006 24 'Teddy Bear'
11 500565 1010 20 'Cooking Set'
A new row appears in the productTable with the data from data_table.
Close the cursor and database connection.
close(curs)
close(conn)
Insert a Record
Connect to the data source dbtoolboxdemo. This data source identifies a Microsoft
Access database. This database contains the table inventoryTable with these columns:
productNumber
Quantity
Seitenansicht 556
1 2 ... 552 553 554 555 556 557 558 559 560 561 562 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare