User`s guide
fastinsert
7-129
curs = fetch(curs);
curs.Data
ans =
...
[ 12] [ 1278] [ 0] '2010-10-29 18:17...'
[ 13] [ 1700] [14.5000] '2009-05-24 10:58...'
[7777] [ 100] [ 50] '2014-10-23 10:01...'
The last row contains the inserted data.
Close the cursor and database connection.
close(curs)
close(conn)
Insert Multiple Records
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
• Price
• inventoryDate
conn = database('dbtoolboxdemo','admin','admin');
Alternatively, you can use the native ODBC interface for an ODBC connection. For
details, see database.
Display the data in the inventoryTable table before insertion.
curs = exec(conn,'select * from inventoryTable');
curs = fetch(curs);
curs.Data
ans =
...
[11] [ 567] [ 0] '2012-09-11 00:30...'
[12] [ 1278] [ 0] '2010-10-29 18:17...'