
![]()
For the experiment in our first MacTech article, we only need to use a utility built into Omnis Studio. We don’t need to do any actual programming this time, although we will execute a couple of lines of code from an SQL command line to solve some problems we will encounter in the second article. On the other hand, it is important to know that the Omnis Studio Integrated Development Environment (IDE) is, in fact, built using the programming features of Omnis Studio itself – so a competent Omnis programmer could build any part of this utility.
The steps and illustrations shown here are for the 3.3.3 version of Omnis Studio. Version 4.x streamlines this and related processes through the use of an integrated browser, so we don’t have to open so many windows (like the Mac OS X finder) when drilling down into deeper levels of the process. If you own a copy of Omnis Studio version 4.0.2, you should have no trouble following along.
To open the SQL Browser in Omnis Studio 3.x, select Tools>SQL Browser… from the main menu bar. The SQL Object Browser window shown here will appear:

Omnis Studio 3.x SQL Object Browser Window
In Omnis Studio 4.x, the SQL Browser is integrated into the same window as the other browsers of the IDE. This window is opened by default when we first launch a development copy of Omnis Studio, but we can use either View>Browser from the main menu or the Command-2 key combination to open it again if we have closed it during our work. The window itself conforms to the Mac OS X standard of tools-only, no embedded menu bar, as shown here:

Omnis Studio 4.x SQL Browser Window
The SQL Browser allows us to poke around in SQL databases for which we know valid usernames and passwords. We can also perform certain utility functions and even move structural information between the table definitions in existing databases and Omnis Studio Schema, Table and Query Classes in an application library.
But all of these are subjects for other times. Right now we need to do a little more setup, since we are using two SQL databases whose DAMs are not shipped with Omnis Studio itself. While it is not required of us, it is useful to set up generic session templates for these two DAMs that we can then duplicate for manual access to specific databases through this utility. It is very easy to do this.
The session templates we create here are only for utility use within the SQL Browser itself. In the code of an application we would create the same kinds of objects, but they would usually not have visual components (icons) associated with them. Session objects are simply conduits that allow our application to communicate with an SQL database. They define the communication channel, or session, with that database. We then use the session object to log on, perform operations with and log off that database.
To create a session template, we must go to session templates view for the SQL Browser. We do this by selecting the Modify Session Templates… item from the Session menu of the browser window. (In Omnis Studio 4.x, just click the Session Manager navigation item on the left side of the main window frame.)

Modify Session Templates Option of Session Menu
This opens the Session Template Manager window where we can view and edit previously defined data access channels.

Session Template Manager Window
Notice that a number of session templates already exist. These correspond to the DAMs that are included in our Omnis Studio installation. Since neither OpenBase nor FrontBase DAMs shipped with Omnis Studio, we need to create our own session templates for those products. But this is really easy! We can just duplicate an existing template and make a few modifications.
Choose any template except the CMS or VCS sessions (these have special additional settings in them that we would have to change) and context-click (Control-click, or Right-click if you have a multi-button mouse) to expose the context menu. Then select Duplicate from that menu, as shown in the illustration above. Now double-click the new icon that appears. This opens the Editor window for this session template.

Session Template Editor Window for OpenBase Template
Fill in the three fields at the top of this window as shown above. Do this in the following order:
OpenBaseThis will create a generic template that we can duplicate in the future for more specific purposes. We do not need to name a host, user or other information here, but will supply values for those items in templates destined to actually open databases. When the first three fields are properly filled in, click the OK button to complete the process.
Now we need a generic session template for FrontBase. First duplicate the OpenBase template, then follow the same steps as above and fill out the form as shown here:

Session Template Modification Window for FrontBase Template
We have now obtained, installed, licensed and prepared all the software we need to perform the hands-on experiment in the March 2005 MacTech article on Enterprise Databases on Mac OS X. (Whew! Now you see why we couldn't do all this in the pages of the magazine...) Time to get back there and get that experiment started!