![]() |
| Previous Top Next |
Connection Wizard |
When the Connection Wizard button in the Open Database dialog is selected, the Connection Wizard (screenshot below) pops up. The Connection Wizard helps you to connect to the most commonly used types of databases. In this section, we go through the steps for connecting to:
| • | A Microsoft Access database (a non-XML DB). Also included with this description is information about connecting to other non-XML DBs. |
| • | An IBM DB2 database (an XML DB; currently, IBM DB2 databases are the only XML DBs that are supported). |
Carry out the following steps to connect to an MS Access database. Select Microsoft Access (ADO) (screenshot below), and click Next.

In the Connect to MS Access dialog that pops up, browse for the MS Access database, and click Next. The connection to the data source is established. For information about selecting tables in the MS Access DB, see DB Data Selection.
| Note: | The following points about non-XML DBs should be noted: |
| • | The following providers (drivers) are recommended: (i) For Microsoft SQL DBs: Microsoft OLE DB Provider for SQL Server; (ii) For Oracle, MySQL, Sybase, and IBM DB2 DBs (versions prior to version 9 are non-XML), Microsoft OLE DB Provider for ODBC Drivers. |
| • | If a password is required to access the DB, it must be saved in the connection string. |
| • | All the connection information is stored in the SPS in the form of a connection string. It is therefore important that all clients that use this SPS must have the same driver installed so that they will correctly use the connection string. |
| • | If an ADO connection is used, hierarchical relationships in Oracle and Sybase DBs are ignored and only flat schemas are generated from these DBs. |
A note on network shares and UNC paths
Any folder on your computer's hard drive can be marked as a 'share'. When this has been done, any other computer on the network can access it and even write to it depending on how the share has been set up. A share can therefore be used on a remote machine exactly as if it were a local folder.
When working with an SPS based on a DB which is on a hard drive (such as an MS Access DB), the folder in which the DB is located must be marked as a share. A UNC path is then used in the connection string to point to the DB. This enables the SPS to connect correctly to the DB when used by clients (such as Authentic Browser) on other machines.
There are two parts to setting up the network share mechanism for a DB-based SPS.
| • | The folder in which the DB is located must be set up for sharing. (In Windows 2000 and Windows XP, the sharing settings are accessed by right-clicking the folder and selecting Sharing and Security....) You must also enable Advanced File Sharing (My Computer | Tools | Folder Options, then uncheck Simple File Sharing). |
| • | Accessing the share and the DB from the remote location. To do this in a DB-based SPS, you have to set up the connection string with a UNC path. The format of a UNC path is: \\servername\sharename\path\file.mdb, where servername is the name of the server, sharename is the name of the share, path is the path to the DB, and file.mdb is the name of an MS Access DB in the shared folder or a descendant folder of the shared folder. |
Note: Network shares and UNC paths are to be used for DBs, such as MS Access, which do not require any driver and are located on a server on a network.
In the first screen of the Connection Wizard (see first screenshot in this section), select IBM DB2 (ODBC) and click Next. The Configuration dialog (screenshot below) pops up. This dialog lists the DSNs of the available IBM DB2 data sources. Select the required DSN from the list. (You can also create a new DSN, which will then be added to the list of existing DSNs and be available for selection.)

On clicking Next, the Connect to DB2 Database dialog (screenshot below) pops up, in which you are prompted for user information (ID and password).

Clicking OK will establish the connection with the database. How to select the required DB information is described in the section, DB Data Selection.
See also:
DBs and StyleVision, for a description of how DBs work with StyleVision.
DB Data Selection, for a description of how to select tables or structures in the DB as the schema and data sources.
The DB Schema and DB XML files, for a description of the XML Schema and XML data files that are generated from the DB when it is loaded in StyleVision.
ADO Connections, for information about connecting via ADO.
ODBC Connections, for information about connecting via ODBC.
Datatype Conversions: DB to XSD, for mappings of DB datatypes to XSD datatypes when the XML Schema is generated from the DB.
|