MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 567

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 566
fastinsert
7-137
colnames = {'InvoiceNumber';'InvoiceDate';'productNumber';'Paid'};
tablename = 'invoice';
fastinsert(conn,tablename,colnames,data)
View the new record in the database to verify that the Paid field is Boolean. In some
databases, the MATLAB logical value 0 shows as a Boolean false, No, or a cleared check
box.
curs = exec(conn,'select * from invoice');
curs = fetch(curs);
curs.Data
ans =
...
[61178] '2012-01-15 00:00...' [ 9] [0] [2378330x1 int8]
[62145] '2012-01-23 00:00...' [10] [1] [ 492314x1 int8]
[ 2101] '2014-10-23 11:14...' [11] [1] []
The last row contains the Boolean data 1.
Close the database connection.
close(conn)
Input Arguments
conn — Database connection
database connection object
Database connection, specified as a database connection object created using database.
tablename — Database table name
string
Database table name, specified as a string denoting the name of a table in your database.
Data Types: char
colnames — Database table column names
cell array of strings
Vedere la pagina 566
1 2 ... 562 563 564 565 566 567 568 569 570 571 572 ... 683 684

Commenti su questo manuale

Nessun commento