| Previous Chapter: Database Maintenance |
The ODBC driver installation is a separate procedure, which allows the user to interface Ovrimos through ODBC Drivers. If the ODBC is not already installed in the user's computer, the ODBC driver setup will install it automatically.
A zipped file, called ovodbc.zip, contains all the necessary items for the installation of the ODBC driver. As soon as this file is uncompressed, users may type install to install the driver. (As mentioned above, this program will install ODBC if it does not exist). Users may obtain their ODBC 2.0 driver and setup program from the same source they got their Ovrimos copy.
The next two captions show two steps from the creation of a new data source, using the ODBC driver.
The list of the available ODBC drivers from which to select a data source appear in the example of caption ODBC-1.

The configuration dialog box of caption ODBC-2 now pops on screen. Four blank fields appear in this box and must be filled with the following information:

Data Source Name: A name, which will be the database name for the ODBC.
Description: A short description text about the data source.
Host Name: The database server name.
Database Name: Win 32: The name of the Ovrimos database or #port. U*ix: The port number, #port.
When all information is typed, the user must press the OK button.
The data source name for the ODBC now appears in the list of data sources.
After clicking on the Close button, the instalation is complete.
An ODBC data source must exist for every user's database that is to be accessed from other ODBC compatible products. This means that the process of installing the ODBC driver must be repeated whenever a user creates a new database and wishes to interface it from another product.
The JDBC driver, called ovjdbc.jar, is copied by the installation program in the shared directory. It is a type 4 JDBC driver (all-Java native driver), conformant to JDBC 1.1 specifications.
The ovjdbc.jar is used to invoke an applet by the applet tag of HTML as follows:
<applet code=class_name ... archive="ovjdbc.jar">
Some technical information about the Ovrimos JDBC driver is provided below:
The JDBC driver connects to Ovrimos using the native Ovrimos RPC protocol over TCP/IP. No middleware is necessary to connect to an Ovrimos Database using JDBC.
port is the SQLPORT. It may be obtained from the database manager.
Any of the properties user or password or both, may
be missing from the URL, and supplied to DriverManager.getConnection.
If both are missing, the semicolon after port must be omitted too.
Connecting to other systems
One of the strong features of Ovrimos is the option to connect to other ODBC compatible programs.
Users may create a New Project with Project Wizard. Caption ODBC-3 shows the first dialog box of the New Project Workspace.

The default platform, as shown, is Win 32, while the location of the new project is, by default, a subdirectory with the same name of the project under the directory where the MFC is installed.
Users must type a name for the new project in the field Name and proceed to the next step by clicking on the Create... button.
There are 6 different screens of the application wizard, where the user will set certain parameters. The screen of interest in this case is the second (step 2 of 6), where the database support is inquired, as caption ODBC-4 shows.

At this point the user will have to select either Database view without file support (3rd radio button) or Database view with file support (4th radio button). As soon as database support is selected, the Data Source... button, which was inactive up to this point, becomes active and the user is prompted to select a Data Source, i.e. an ODBC database to connect to.
By clicking at the Data Source... button, a new dialog box, as shown in caption ODBC-5 appears on the screen.

The ODBC radio button is active and as soon as the user clicks on the arrow of the blank field, a list of available ODBC data sources is unfolded. It is necessary to have an installed ODBC driver for the target database, otherwise the database does not appear in the list. The database name in the list is the one given as Data Source Name in the ODBC configuration dialog box.
In the screen example, Ovrimos is chosen. After clicking on the OK button, a new dialog box, such as the one in caption ODBC-6 appears.

The Username and Password field are always active and must be filled with the user's name and password, while the other two fields, Host name and Database are not active, because the information is already known to the system. It has been previously provided during the ODBC driver installation.
By clicking on the OK button, connection to the database is attempted.
The database server must be up and running on the host machine when the connection is attempted. Otherwise a failure message is returned.
After successful connection to the database, a list of the available database tables appears on the screen. Caption ODBC-7 is a sample of a small book database.

The user must select at least one table as a data source.
After clicking on the OK button, the data source is defined and the rest of the MFC Wizard setup steps are run. Users proceed from one step to the next by clicking on the Next button.
The final step (step 6 of 6) is a dialog box showing the classes to be created by the AppWizard. When all parameters are set, the user clicks on the Finish button.

The AppWizard starts creating the newly defined classes. As soon as this process is completed, an information screen, presenting the generated data, such as the one in caption ODBC-9 appears on screen.

The user may now start developing the new project.
Connection with powersoft Optima++ is also easy. An ODBC driver should be installed and configured for the target database, before proceeding with the connections. The first screen of the new Optima++ project is the basic menu box on the top and the form box underneath.
To start developing a Powersoft Optima++ application with connection to a database, users must click on the Database of the folder toolbar. Another toolbar appears below, containing, among other icons, an icon for transaction setup and an icon for query setup.
Users should first click on the transaction icon and bring a copy of the icon in the form area below. By clicking on the right mouse button, a menu of possible options appears. Caption ODBC-10 is an example of this state.

By clicking on Properties, a dialog box with form properties appears. Users may wish to modify the form properties or ignore the dialog box. By clicking on the right mouse button and selecting properties again, a new dialog box, such as the one of caption ODBC-11, appears on the screen.

Data Source: This is the ODBC name of the database, as given during the ODBC configuration driver.
UserID: The user's name.
Password: The password of the user.
After filling in the information, users may connect to the database by clicking on the Test Connection... button. The SQL Server must be up and running before attempting to make a Test Connection.
If the connection succeeds, then the next step of the project is in order. Similarly to fetching into the form the transaction icon, now the query icon will be fetched, by clicking on it and then selecting a position in the form to place it. Again, the Properties selection must be pressed and a new dialog box, this time for the query, appears on screen.
It is necessary to connect the query with an existing transaction. Caption ODBC-12 shows the form when the existing transaction is selected.

When the Test button is pressed, a new form, such as the one in caption ODBC-13 appears. The use will select the query data. All available tables of the database are shown in the list on the left side of the picture.

At least one table must be selected. All selected tables appear on the right list. Tables may be added or deleted from the selection list, by clicking on the Add>> or <<Delete button.
The user now clicks on the Test folder and a sample SQL statement appears in the text area. Caption ODBC-14 shows an example of the test query, assuming that the table BOOKS was the one chosen. The results of the query are shown at the bottom area.

One important note: By default the Quote table and column names box is checked by the application form. Since there are no quoted table and column names in the Ovrimos SQL, this box must be unchecked.
By clicking on the Test... button, the bottom text area of the form is filled with the results of the query. Even if the tables are empty, the column names appear as titles in the text area.
The user may continue adding queries until the Optima++ project is complete.
The connection to EXCEL offers a way to view the database data through the Microsoft Office environment. To connect to the database the user must proceed as follows: After starting Microsoft Excel, choose Data from the bar menu and Get External Data from the Data menu. The selection from the Get External Data is Create New Query. Note: This selection does not appear in versions prior to 5.0. The following procedure is based on Excel 97.

A list with the available data source appears on screen, to choose Data Source. If the database is previously configured for use through Microsoft Query, then the user may search in the list until the data source is found. Otherwise, A New Data Source must be chosen.
The dialog box for the New Data Source consists of four fields:
Username: The user's name must be filled in.
Password: The user's password must be filled in.
Host Name: The host computer name, where the database server is running, must be typed in.
Database: The target database must be filled in. There is an
expandable list arrow in the box. The database may be selected from the
list.
The target database must be up and running at the time the connection
is attempted.
If the data source is previously configured and exists in the list of available data sources, then only the first two fields are blank. The Host Name and Database are filled by the system, using the existing configuration information.
After connecting to the database, a dialog box with the available tables
appears. Users must select at least one table. Next, a dialog box with
the available columns appears. Several forms appear, inquiring parameters
about the appearance of data on screen. The user may decide on the ordering
of data, the filtering of information etc. The button Finish allows
the query to proceed and the data to appear in the Excel tables.
The following are valid for Delphi 2.0.
First, run the BDE Configuration Utility.
Click on "New ODBC Driver" to add the Ovrimos ODBC Driver to the list.
Type a name in the field "SQL Link Driver".
Then, select the Ovrimos ODBC Driver in the combo box "Default ODBC
Driver" and a data source in the combo box "Default Data Source Name".
Subsequently, click on the tab "Aliases", or select Pages|Alias.
Click on "New Alias" to add a new alias to the list. Type a name in
the field "New Alias Name", and select "ODBC_link-name" as the "Alias
Type", where link-name is the name you specified in the "SQL Link
Driver" field.
You now have an Alias you can use in Borland Delphi to connect to an
Ovrimos Database.
| Previous Chapter: Database Maintenance |