JDBC  «Prev 

Setting up JDBC[Data Source] - Exercise

Setting up A JDBC data source

Objective: Create a data source to be used in later lessons.

Exercise scoring

This exercise is worth 2 points. The exercise is auto-scored, which means that all you have to do to receive credit for it is click the Submit button below.

Background/overview

Before your servlets can access a file on your hard drive, you must set up a data source. Since we’ll be using the JDBC-ODBC bridge, you set up an ODBC data source.

Download files

You need to use the following file from the Exercise download: servletsample.mdb (The starter database).

Instructions

  1. Bring up the control panel, then ODBC or 32-bit ODBC (it’s the same product, with different names in different versions of Windows.).
  2. On the System DSN tab, click Add.
  3. Choose the Microsoft Access Driver, and click Finish.
  4. Enter the name of the DSN, javadeploy.com, and a sensible description.
  5. Click Select, and browse to the directory where you downloaded the sample database.
  6. Click OK to see your new DSN included on the System DSN tab.