User`s guide

Connecting to a Database Using the Native ODBC Interface
3-19
'unitCost' 'productDescription'
Define the data for the row to insert in the cell array coldata.
coldata = {11,800999,1006,9.00,'Toy Car'}
coldata =
[11] [800999] [1006] [9] 'Toy Car'
Insert the data in coldata into the productTable with the defined column names,
colnames.
insert(conn,'productTable',colnames,coldata);
Caution: The Microsoft Access ODBC driver demonstrates unexpected behavior during
large inserts. When inserting large amounts of data with Microsoft Access, insert the
data in batches. For example, if you want to insert 100,000 rows of data, insert 10,000
rows at a time.
Close the cursor object curs, and then close the database connection conn.
close(curs)
close(conn)
Caution: Leaving cursor and connection objects open or overwriting open objects can
result in unexpected behavior. Once you are finished working with these objects, you
must close them using close.
Native ODBC, JDBC/ODBC Bridge and JDBC Interface Comparison
This table highlights the differences between using the native ODBC, JDBC/ODBC
bridge, and JDBC interfaces to access and manipulate data in a database.
Item Native ODBC JDBC/ODBC Bridge JDBC
Connection function Use
database.ODBCConnection
Use database Use database
Actions Can perform the
following actions:
Can perform the
following actions:
Can perform the
following actions: