Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles

SQL etc

Posted Nov 24, 1998

Introduction to Databases for the Web: Pt 4 - Page 4

By Selena Sol

JDBC Example

Okay, well, as I have always said, an example is worth a thousand pictures which is heck of a lot of words. So I would like to conclude this tutorial with a little JDBC application I put together.

Essentially, this application will hook into my MSAccess database and allow me to search or modify the contents of the CUSTOMERS table. If you have been following along in this tutorial, you will already have set up such a database and table. If not, you can imagine. Or better, yet, you can modify a few lines, recompile and get this working on your own databases and tables.

I have coded the application so that it should be very easy for you to modify it for use at your site. All the GUI design and site specific information have been separated out. You need not worry about the implementation of the code besides changing a few simple GUI sections and Strings.

There are 5 files in the application code:

  • DataGrid.java - A Microline Component Toolkit Grid Object. The MCT is free and available at Neuron Data. There is no need for you to edit this file.
  • GlobalResources.java - There are some implementation specific things defined here. You should change them for your site and recompile. I have noted with comments which lines you should change.
  • MainFrame.java - The Main display frame. Leave this alone.
  • StartButton.java - The applet frontend. Leave this alone.
  • UserInterface.java - The definition of the User Interface. You should change this to reflect your own DB Table and recompile. Changes you need to make are commented.

The entire application with compiled classes is zipped up here. When you run it, you will see the following interface:

[JDBC Interface]


Additional Resources:

SQL etc Archives

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Latest Forum Threads
SQL etc Forum
Topic By Replies Updated
MySQL rollback UAL225 0 August 21st, 09:56 PM
Complex Search Query Galway 0 May 20th, 10:04 PM
change collation at once supercain 2 May 15th, 06:18 AM
SQL Features, tools and utilities question Neomite 1 April 10th, 09:13 AM