User`s guide
Configure Data Sources and Connect to Databases
4-7
Tip Some Windows systems support both ODBC and JDBC drivers. On such systems,
JDBC drivers generally provide better performance than ODBC drivers because the
software does not use the JDBC/ODBC bridge to access databases.
Before You Begin
Before you can use Database Explorer with the examples, do the following:
1
Set up the data sources that are provided with Database Toolbox.
Requirement: If you use Visual Query Builder (querybuilder) to access a JDBC
data source, before starting Database Explorer for the first time, execute this
command. You cannot use the same JDBC data source with Database Explorer.
setdbprefs('JDBCDataSourceFile','')
2
Configure the data sources for use with your database driver.
• If you are using an ODBC driver, see “Configure ODBC Data Sources” on page
4-8.
• If you are using a JDBC driver, see “Configure JDBC Data Sources” on page
4-12.
Set Up the dbtoolboxdemo Data Source
The dbtoolboxdemo data source uses the tutorial database located in matlabroot/
toolbox/database/dbdemos/tutorial.mdb.
1
Copy tutorial.mdb into a folder to which you have write access.
2
Confirm that you have write access to tutorial.mdb.
3
Open tutorial.mdb from the MATLAB current folder by right-clicking the file and
selecting Open Outside MATLAB. The file opens in Microsoft Access.
Note: Depending on the Access version that you are running, you might need to
convert the database to that version. For example, beginning in Microsoft Access
2007, you see the option to save as *.accdb. For details, consult your database
administrator.