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:
- 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 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.
- Find out what the driver name is for the JAR or ZIP file you are using.
The name is usually something like "com.ibm.as400.access.AS400JDBCDriver".
- Find out what the database URL is. Check with your 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 DBMS 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.
- Start up ConsultComm and go to Tools->Manage Plugins->JDBC
- Enter in all relevant information. If you are using a specific JDBC
driver, fill in the path to the driver's .jar or .zip file, the driver
name and URL you found in steps 1, 3 and 4 (if you select the ODBC bridge
the driver name will be grayed out).
- Some JDBC drivers specify the database name in the URL, some do not.
If the database name is not specified in the URL, be sure and enter in
the database name and table name you will be exporting your times to.
Otherwise select "Don't Specify a Database."
- 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.
- Go to the "Field Values" 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.
- 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 Name | Type | Value |
EMPNAME | CHAR | $USERNAME |
EMCHARGE | BIT | $BILLABLE |
EMHOURS | DECIMAL | $HOURS |
EMPROJ | CHAR | $PROJECT |
EMDATE | TIMESTAMP | $DATE |
EMLINE | DECIMAL | 0 |
EMCSLT | CHAR | Y |
- 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)
- Upper Case Project:
If checked will make all project names UPPERCASE when exporting to a
table
- Hit "Save" when you're happy with the changes.
To submit your times to a database, you must first specify the actual
project names for each item in your list. Click on
Tools->Manage Plugins->JDBC->Project Names to map project names in
ConsultComm to project names stored within your database. For example:
Export | Project | Alias |
X | Web Development | INTERNAL-WEBDEV |
| Lunch | |
X | Installing Software | INTERNAL-SOFTWARE |
Hit "Save" when you're done.
When you're ready to send your time to a table, go to Tools->Export to
Database. 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:
- Your name and e-mail address
- The name of the company/product that the JDBC driver is released under
- The driver name
- The database URL (masquerading any info that needs to stay secure)
- A list of fields, types and values you have assigned to them
- The specific error returned