In step 3 above, we can specify many different types of data sources for importing or
linking tables. Manifold's internal copy of the Jet database engine can
directly read database files in the following formats, including all the various
sub-variations normally found of these. In addition, we can choose to connect via
OLE DB or ODBC or via UDL or DSN files (that capture, respectively, a predefined
OLE DB or ODBC connection).
| CSV
| Comma separated values ASCII files
|
| DB
| Borland Paradox
|
| DBF
| dBase and FoxPro
|
| DSN
| ODBC file data source that describes an ODBC driver to use.
|
| HTML
| Tables in web pages
|
| MDB
| Access 2000 and Access 97
|
| UDL
| Microsoft Universal Data Link file that describes an OLE DB connection.
|
| WKx
| Lotus tables
|
| XLS
| Excel tables
|
| ODBC Data Sources
| Connect to a data source using ODBC drivers installed on this system.
|
| OLE DB Data Sources
| Connect to an OLE DB data source using an OLE DB provider installed on this
system.
|
For example, if we wish to import tables from Microsoft's sample Nwind.mdb
database, we choose several at a time.
Click on any table to highlight it. Click on more tables using CTRL click or
SHIFT click in the usual Windows way to highlight additional tables.
SHIFT clicking on another table will highlight all the tables in between.
Note: Some databases have many tables. To see the tables in sorted order, click
on the Name column head in the dialog.
Data Link Properties Dialog
Manifold System uses the standard Microsoft OLE DB data source Data Link
Properties dialog to allow connection to OLE DB data sources. It's a lot easier to
use than it looks.
Choose the OLE DB data link type desired. Note that in Microsoft's world
there are often many different ways to access the same type of data. For example,
Manifold can open any Access .mdb file directly, or we can open an .mdb file by using the Microsoft Jet 4.0 OLE DB Provider. If we've installed any
"Office" software or other database capable software, we will also have an
ODBC driver on our system that can open Access .mdb files as well. So, we could use the OLE DB Provider for ODBC Drivers to open
an ODBC data source for .mdb files.
After choosing the provider, click the Next button to move to the Connection tab.
The Connection tab will be pre-loaded with the right connection parameter choices for the
type of OLE DB provider selected. In the illustration above, we've chosen the
provider for ODBC Drivers and so we see the right connection options for
connecting via ODBC. The data source name list box will be pre-loaded with the ODBC data sources currently configured
on our system.
If we had chosen the OLE DB Provider for SQL Server and then pressed Next, the Connection tab would be loaded with the right choices to connect to a SQL Server
database via OLE DB.
Provide the necessary information for the provider chosen and then press OK. The Advanced tab shows various advanced options for the specified provider, and the All tab provides a summary of the data link properties specified.
Sophisticated database systems such as SQL Server or Oracle may be configured
in sophisticated ways. The information in the Connection tab and, possibly, the Advanced tab reflect the sophistication of such systems. If you are unfamiliar with
the specific expectations of the SQL Server or Oracle or other provider that you
wish to use, you may have to consult with the database administrator in charge
of the installation to determine the correct settings to use.
Connecting Via ODBC
ODBC as a database connection technology preceded OLE DB, so there are more
ODBC drivers for different types of databases than there are OLE DB drivers.
Manifold System connects to ODBC data sources through whatever ODBC drivers are
installed on the computer.
ODBC is easy to use if we remember that the slightly tedious part is creating
a new "source." Some ODBC sources are quite simple and consist of specifying
what type of database driver to use (dBase, Access, etc.). Other ODBC sources,
such as connecting to SQL Server via ODBC, are more complex and require what
type of driver to use, which database is to be opened and from which machine or
server it is fetched. In the case of some systems, such as SQL Server and
Oracle, there are both OLE DB and ODBC drivers.
Set up ODBC data sources using the Windows ODBC Data Sources administrator
dialog that is called by clicking on the ODBC Data Sources icon in the Windows
Control Panel. This icon is located in the Administrative Tools folder in the
Control Panel in Windows 2000.
Using UDL Files and OLE DB Data Sources
A Microsoft UDL file is simply a pre-packaged shortcut to an OLE DB data
source. We create a UDL file as noted below. We can then use OLE DB data link
properties dialogs to configure the data link that will be used by the UDL file.
Note that when opening an OLE DB data source or creating a UDL file we end up
using exactly the same OLE DB dialogs.
Why bother with creating a UDL file if doing so requires us to use the OLE DB
dialogs anyway? We would create a UDL file as a shortcut if we thought we
might wish to use that same OLE DB data source again in the future in the same
way. The UDL file saves our OLE DB dialog choices so that in the future the UDL
may be "opened" like any other file using the simple File - Import - Table or File - Link - Table dialogs. This simplifies subsequent connections to the data source: simply
click open the UDL file with no need to deal with the OLE DB dialogs.
Creating and Using a UDL File
Creating a UDL file is a standard Microsoft procedure that is documented in
Windows (search for "UDL" in Windows Help). Suppose we have an Excel spreadsheet that contains a
table and we would like to connect to that table using a UDL file. Our
spreadsheet is called MySheet.xls. We would proceed as follows: