User`s guide

3 Working with Data Sources
3-18
Note: The native ODBC interface has a default batch size of 100,000 that enables
acceptable performance. To override this value, you must use setdbprefs as follows. Set
FetchInBatches to yes and set FetchBatchSize to a specific batch size number <h>.
setdbprefs('FetchInBatches','yes')
setdbprefs('FetchBatchSize','<h>')
Use fetch to import all data into the cursor object curs, and store the data in a cell
array contained in the cursor object field curs.Data.
curs = fetch(curs);
View the contents of the Data element in the cursor object curs.
curs.Data
ans =
'Victorian Doll'
'Train Set'
'Engine Kit'
'Painting Set'
'Space Cruiser'
'Building Blocks'
'Tin Soldier'
'Sail Boat'
'Slinky'
'Teddy Bear'
Export Data Using the Native ODBC Interface
Define the columns of data to insert in the cell array colnames.
colnames = {'productNumber','stockNumber','supplierNumber',...
'unitCost','productDescription'}
colnames =
Columns 1 through 3
'productNumber' 'stockNumber' 'supplierNumber'
Columns 4 through 5