User`s guide
5 Using Visual Query Builder
5-60
Exporting Boolean Data to Databases
Logical data is exported from the MATLAB workspace to a database as type BOOLEAN.
This example adds two rows of data to the Invoice table in the dbtoolboxdemo
database.
1
In the MATLAB workspace, create I, the structure you want to export.
I.InvoiceNumber{1,1}=456789;
I.Paid{1,1}=logical(0);
I.InvoiceNumber{2,1}=987654;
I.Paid{2,1}=logical(1);
2
For Data operation, choose Insert.
3
In Data source, select dbtoolboxdemo.
4
In Tables, select Invoice.
5
In Fields, select Paid and InvoiceNumber.
6
Assign results to the MATLAB workspace variable I.
7
Click Execute to run the query.
VQB inserts two new rows into the Invoice table.
View the table in Microsoft Access to verify that the data was correctly inserted.