Abelli Software
freeware
licence
useful links
donate
payware
 
topleft  
 

DbPlusJ (Java) v 2003.09.05 Beta

A GUI for interactive SQL

Requirements:

1. You must have Java 2 JRE 1.4 or later installed on your computer (e.g. as part of JDK 1.4)
2. The bin-directory of the JRE (or the JDK) must be in the "path" environment variable

Installation:

You have several options for installation:

(NB! In several places my old name of the application, SQLplus, is used)

Distribution Installation Exekvering
SQLplus.zip (1917 Kb), including drivers for Oracle (1536 Kb) and MySQL (474 Kb) Unpack the contents in a directory of your choice. Start SQLplus.jar as an application. (If you have Windows and your computer isn't configured to start jar-files, use SQLplus.bat instead.
SQLplus.jar (44 Kb) I you already have an older version of DbPlus, it should suffice to download only SQLplus.jar and replace your old version with it. ...

This is how DbPlus works

1. Choose type of Connection with the ComboBox [Connection].

2a. Fill in "username" and "password", click on [Open Connection] if it requires this in formation. (which Connections you can choose from is stored in the file "Connections.xml". This file contains from start some "default connections" which can be suitable as starting points)

screenshot

2b. If you want it to run against a Microsoft Access/Jet-database, you choose that alternative in [Connection] and fills in the path to the mdb-file in the field "Database".

screenshot

Instead of writing the path by hand, you can open it with a FileDialog [>>], and choose an mdb-file that way.

screenshot

3. Now the main Window will appear:

screenshot

If all is well with the Connection, you'll see screenshot in one of the buttons in the toolbar. If something went wrong when trying to establish the Connection, that button will instead show the icon screenshot.

4. To execute an SQL statement you write it in the TextArea below the tab [SQL Statement] and click the button screenshot. The textare will give "syntax highlight" for reserved words in PL/SQL if you have checked the checkbox.

Depending on the result of your SQL statement, the response will differ. If you have executed an ordinary query, you're moved to the tab [Result], where your result will be shown in a table. (You can change the size of the window and width of columns just by "grabbing the edges and drag"):

screenshot

If something goes wrong, or if the SQL statement wasn't a query, you're moved to the tab [Messages]:

screenshot

Under the tab [Table Info] you find descriptions of the tables and view you have on your database.

screenshot

Buttons in the Main Window:

screenshot Execute the SQL statement.
screenshot All your SQL statements during a session is saved in a "history list". With this button you can "scroll backwards" among them...
screenshot ...and with this you scroll forward. Note that the statements are not executed automatically, but will just be put inot the field under the tab [SQL Statement]
screenshot If you had AutoCommit off, this button sends a "ROLLBACK" for all updates you've made since the last "COMMIT".
screenshot If you had AutoCommit off, this button sends a "COMMIT" for all updates you've made.
screenshot
eller
screenshot
This button shows if you have an open Connection or not. When you click this button, the login dialog will appear, which will make it possible for you to change to another Connection, or reopen the previous one it has failed.
screenshot A short description on what the buttons stand for (the same as what you've read here)

Menues

[Actions]
[Auto Commit]
Default is that your SQL statements not are autocommited. By this you can "redo" what you've done with the "ROLLBACK" button. With this option you can set "Auto Commit On", which means that each statement will be followed automatically by a "COMMIT".

NB! If you neither have "Auto Commit On" nor do a "manual" commit, you will lose all updates you've made when you close the application!

[Actions]
[Syntax Highlight]
This is the same "Checkbox" as under the tab "SQL Statement".
[Actions]
[Configure Connection Properties...]
See below on "DbPlus Configurator".
[Help]
[Help...]
The same as the "Help"-button in the toolbar...

DbPlus Configurator

With "DbPlus Configurator" you can add, remove or change the properties for the "Connections" you can choose from. This is also available via menu [Actions][Configure Connection Properties...]:

screenshot

These properties can also be altered by "manuelly" edit the text file Connections.xml.

Label This is shown in the Comboboxen at login. In this dialogue you see the labels for all configurations to the left.
Driver The Java class for the JDBC driver.
Connection String The "url" for a JDBC connetion to a specific database.
Jar(s) Path to the jar-file(s) that contains the JDBC driver. Relative paths are allowed, starting from the directory where  SQLplus.jar is. To remove a jar-file from the list; mark it and click on [Drop jar]. To add a jar-file to the list; click on [Add jar].
   
Save Property Saves the changes on the properties shown. NB! They will not be permanently saved until you click on "Save to XML-file".
Delete Property Deletes shown property. NB! They will not be permanently removed until you click on "Save to XML-file".
Save to XML-file Overwrites "Connections.xml" with the current information on all "Connection Properties" (with all changes you've made).

Bugs

"Syntax highlight" under the tab [SQL Statement] miss some keyword and is sofar only extended to PL/SQL (Oracle's dialect, which is a superset of SQL-92).

MS Access doesn't support all JDBC methods that's needed to extract complete information under the tab [Table Info]

Specific command (e.g. Commit och Rollback) gives an "ugly" printout in [Message], if no Connection is open...

NB! In the downloadable files, I've only included the drivers for Oracle and MySQL (Access is run through Suns ODBC-JDBC bridge).

Why DbPlus in Java?

As a lecturer in university courses I have used many different tools for the students, e.g. SQL*Plus from Oracle for "interactive SQL" to create tables and make queries.

  • Either the tools we used was "locked into" a specific DBMS, or it was too complex for the students. The study time is more precious than to learn a specific tool rather than to learn the contents of the course.
  • The students have to an increasing extent chosen to make their assignments at home (broadband), which forced them to install unnecessarily complex tools.

I thought of the possibility to create some tool that could work in a similar way as e.g. SQL*Plus, but towards several DBMS, and with a simpler installation.

I made some prototypes that I used in programming classes as examples on what could be done in Java and C#. Until now ADO.NET wasn't suitable, as we used Oracle, and it was necessary to install the Oracle SQL-client to make it work with ADO.NET.

The easiest solution was hence to implement it in Java, as JDBC drivers of type 4 allows us to just "drop it" into the directory, witout any other requirements than to have the JRE installed.


Copyright © Björn Abelli, abelli software, 2006

For donations with Payson
www.abelli.se
 
bottomleft