eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak


Introduction to Databases for Web Developers
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 simply 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]


Previous | Table of Contents