SQL*Magic : Super*SQL
|SQL*MagicSuper*SQLCase StudiesResourcesTechnology ChoicesSQL StandardLinks

Super*SQL Quick Start Guide

This manual is broken up into the following sections:

  1. Java Runtime Environment
  2. Required Software
  3. Launching Super*SQL
  4. The Registration Screen
  5. The Connection Screen
  6. The Command Screen
  7. Running in True "Batch" Mode

1. Java Runtime Environment

Before you run Super*SQL you will need to have a Java Runtime Environment installed. Detailed instructions on how to install the JRE can be found at java.sun.com.

Note: you may already be working in an environment where the JRE is available. From a command prompt in Windows or Linux/Unix, try typing


java -version

If you get a response there is nothing else required. If you do not get a response, you can use the Windows Explorer file finding tool to try and locate the file java.exe. In Linux/Unix, use the find command to search for the script java, or use Sherlock under MacOS to search for JBindery. If you are able to find the java executable using any of these tools, you only need to set your path correctly in order to launch Super*SQL.

Super*SQL has been tested using all versions of the JRE from 1.2 through the current version 1.4.

2. Required Software

You will need to download the SuperSQL.jar archive file. For Oracle connections you will also need classes111.zip or classes12.zip. For MySQL connections you will need a current mm*.jar. For other JDBC connections you will need the corresponding jar file.

3. Launching Super*SQL

There are several different ways to launch the Super*SQL program, depending upon the hardware and OS platform you are using.

Windows 95/98/200/NT/XP

You should be able to launch Super*SQL by just double-clicking on the SuperSQL.jar file from the Windows Explorer. If you asked to provide an application you will need to browse to your version of the JRE. You can also launch the application from a Command Prompt window by typing:

java -jar SuperSQL.jar

Unix/Linux/Mac OS X

Launching Super*SQL in a *nix environment You should be able to launch Super*SQL by just double-clicking on the SuperSQL.jar file from the Finder or FileManager.

Mac OS 9.x

Launching Super*SQL in Mac OS 9 Super*SQL is launched by dragging the jar file onto the JBindery icon. This will bring up a screen where you can add any other JDBC jar files to the classpath.

4. The Registration Screen

Super*SQL registration screen If you are using an unregistered copy of Super*SQL or your registration key has expired, you will first see the registration screen. If you have a new key, enter the exact Registrant name and the key value and press the Register button. Otherwise press the "I will continue using the unregistered copy" button.

5. The Connection Screen

Super*SQL connection screen You will then see the connection screen. Choose a connection type or specific connection from the drop-down list. You will then be asked to provide all the connection parameters for the particular type of database that you want to connect to. These parameters will be saved as a ConnectionURL so that you will not have to enter them again in subsequent sessions.

Note: If you choose "Provide connection URL and Driver String" you will have to provide both the complete connection URL, and the corresponding driver string for the connection. The driver string will be something like Org.as220.tinySQL.dbfFileDriver. This option should allow you to connect to databases that are otherwise unknown to Super*SQL. Remember to have the appropriate JDBC jar file in the CLASSPATH.

Once you have entered the required parameters, click on the Connect button. A message in the lower part of the screen will indicate whether or not the connection was successful.

6. The SQL Command Screen

Super*SQL command screen You now have a direct connection to your database. You can enter any valid SQL statement in the upper window, terminated by a semi-colon. Pressing the Execute Command button will cause the command to be processed and the results will be shown in the lower part of the screen.

In addition to native SQL commands, Super*SQL supports the following additional commands.

SET HEADING ON<OFF>
SET PAGESIZE <number of lines before headings are repeated>
SET TERMOUT ON<OFF> - controls screen output
SET FORMAT NORMAL<HTML>

SPOOL filename - spools output to the specified file. This will suppress output to the screen unless you also SET TERMOUT ON.

START filename - this command reads SQL statements from a command file. Note that the command file can contain substitution variables which are supplied with the start file name. For example, if the file mycommands.sql contained the following commands:

SET FORMAT HTML;
SPOOL webpage.html;
SELECT &1,&2 FROM &3;
EXIT;

From within Super*SQL, typing in START mycommands.sql COLUMN1 COLUMN2 TABLE1 would result in a report listing the values for the columns COLUMN1 and COLUMN2 selected from TABLE1 in a webpage format.

7. Running in True "Batch" Mode:

Super*SQL can be run in batch mode, which would allow it to be used in cron scripts or automated procedures to update web pages or generate reports. When you create a connection to a database using the interactive screens, a nickname is stored for each connection. For Oracle connections this is the Oracle SID. For MySQL connections this is the database name. For tinySQL connections the user is asked to provide a nickname. Super*SQL can then be launched with a command such as the following;

java SuperSQL userid/password@nickname mycommands.sql COLUMN1 COLUMN2 TABLE1

The result in this case would be a report written to the file webpage.html