Connecting ConsultComm to a Database

Consultant Communicator can upload all of your projects and times to any JDBC or most ODBC compliant databases! Here's a few quick steps on how to get database connectivity working:
  1. Get a JDBC driver. Check with the company that sells your database product or your local database administrator to see if they have a JDBC driver you can use. Sun offers a list at http://industry.java.sun.com/products/jdbc/drivers. You can also use the JDBC-ODBC Bridge Driver that comes with Java 1.3 or higher if you have ODBC installed (this will probably make exporting to a database much slower, however). If you want to use the ODBC brige, skip to step 4.

  2. Once you have the correct JAR or ZIP files, place them in the Java Runtime Environment's extensions directory (see Important Directories You Might Need to Know for the location of your extensions directory).

  3. Find out what the driver name is for the JAR or ZIP files you just placed in the extensions directory. The name is usually something like "com.ibm.as400.access.AS400JDBCDriver".

  4. Find out what the database URL is. Check with our database administrator if you are unsure... it usually follows the form "jdbc:as400://192.168.0.0" where "as400" would be replaced by a specific driver label and "//192.168.0.0" would be the IP address of a remote database (probably "local" if you are using a local database). If you are using the JDBC-ODBC bridge just enter in the name of the data source you wish to use.

  5. Start up ConsultComm and go to Tools->JDBC Settings

  6. Enter in all relevant information. If you are using a specific JDBC driver, fill in the driver name and URL you found in steps 3 and 4 (if you selected the ODBC bridge the driver name will be grayed out). Be sure and enter in the database name and table name you will be exporting your times to.

  7. Hit "Test" to make sure your driver works. You will be prompted for a username and password to access the database. If your verification fails,double-check your settings and try again.

  8. Go to the "Field Mappings" tab. It may take a few seconds, but soon a table will pop up listing all the fields for the table you specified in step 6.

  9. Fill in all the necessary values for the fields in your table. If you want to export a value from ConsultComm you can type in one of the following variables and ConsultComm will automatically convert it:
    $USERNAME
    The username you enter in when authenticating to the database
    $PROJECT
    The Project Name
    $HOURS
    The number of hours worked on a project
    $DATE
    Today's date
    $BILLABLE
    The "Billable Project" flag
    All other values you type in will be interpreted literally. For example, I might have the following settings in a table EMPHRS:
    Field NameTypeValue
    EMPNAMECHAR$USERNAME
    EMCHARGEBIT$BILLABLE
    EMHOURSDECIMAL$HOURS
    EMPROJCHAR$PROJECT
    EMDATETIMESTAMP$DATE
    EMLINEDECIMAL0
    EMCSLTCHARY

  10. Click on the "Options" tab. Here you can set constraints on the variables that you entered in on step 9. You can select from the following choices:
    • Export Hours By:
      • Quarter of an hour (i.e. 1:37 becomes 1.5)
      • Tenth of an hour (i.e. 1:37 becomes 1.6)
      • Full Precision (i.e. 1:37 becomes 1.62)
    • Date Type:
      • SQL Date (for fields with type DATE)
      • SQL Date (for fields with type TIMESTAMP)
      • Decimal Date (i.e. 10/01/01 becomes 20011001)
    • Upper Case Project:
      If checked will make all project names UPPERCASE when exporting to a table

  11. Hit OK when you're happy with the changes.

  12. When you're ready to send your time to a table, go to Tools->Export to Table. Hopefully everything will work fine ;)
If you are having problems, check the project page at http://sourceforge.net/projects/consultcomm. Search through the discussion forums or the bug reports to see if your problem has been addressed. If you are having problems with the ODBC Bridge check Sun's JDBC-ODBC Bridge page at http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html
If you still can't find an answer you can submit a bug report for ConsultComm. Be sure to include: