Connecting to a Data Source

Instant Report currently has support for database data sources.

To setup a new database connection, click the Report Menu option, and click Data Source... item. The New Database Connection dialog box appears. Enter the User name, Password, JDBC database URL, Driver Class Name: in the text fields provided, and browse to select the file(s) (.class, .jar and .zip files) that contains the driver class. Click on the Test! button to test the new connection. If successful, click OK to continue and return to the main window. Instant Report saves a list of valid connections and will be automatically available for you to build a query.

The JDBC database URL begins with jdbc:protocol: This is the standard. After this is driver specific, and no two drivers are the same. For PostgreSQL database for example, a valid URL is jdbc:postgresql:database where database is the database to connect to.

A JDBC driver is a java classpath to a java class that serves as an interface between the relational database and other java tools. When java loads any class, it searches a list known as the classpath. This is a list of directories where classes are placed, or a list of jar files (archives containing classes and other resources) or both. Most JDBC connection errors are due to invalid or unrecognized driver. Because each driver has different notation, the only way to know what URL to use with a given driver is to read the driver's documentation.

You should also contact your database vendor for details about JDBC connection. The following is a list of possible connection entries for different databases:

Cloudscape

Driver Class: COM.cloudscape.core.RmiJdbcDriver
Class Path: cloudclient.jar;RmiJdbc.jar
URL: jdbc:cloudscape:rmi:CloudscapeDB;create=true

HSQL database engine

Driver Class: org.hsqldb.jdbcDriver
Class Path: hsqldb.jar
URL: jdbc:hsqldb:hsql://<host>

JDataStore

Driver Class: com.borland.datastore.jdbc.DataStoreDriver
Class Path: jdsserver.jar
URL: jdbc:borland:dsremote://<host>/<db>
where <db> is full path to a <file>.jds file

Mckoi SQL Database

Driver Class: com.mckoi.database.jdbc.MDriver
Class Path: mkjdbc2.jar
URL: jdbc:mckoi://<host>/

PointBase

Driver Class: com.pointbase.jdbc.jdbcUniversalDriver
Class Path: pbclient43.jar
URL: jdbc:pointbase:server://<host>/<db>

DB2

Driver Class: com.ibm.db2.jdbc.app.DB2Driver
Class Path: db2java.zip
URL: jdbc:db2:sample

Interbase

Driver Class: interbase.interclient.Driver
Class Path: interclient.jar
URL: jdbc:interbase://<host>/<db>
where <db> is full path to a <file>.gdb file

Oracle

Driver Class: oracle.jdbc.driver.OracleDriver
Class Path: classes12.zip
URL: jdbc:oracle:thin:@<host>:<port>:<sid>
For Oracle thin driver, try "jdbc:oracle:thin:@host:1521:sid". host can be "localhost" or "127.0.0.1" if the Oracle database is running on the same computer. 1521 is the default port number; that will only be different if the Oracle database was configured to use a different one. The "sid" is a string that identifies where to find the database. It is not necessarily the same as the database name.

Sybase

Driver Class: com.sybase.jdbc2.jdbc.SybDriver
Class Path: jconn2.jar
URL: jdbc:sybase:Tds:<host>:<port1521>

MetaMatrix

Driver Class: com.metamatrix.jdbc.MMDriver
Class Path: mmweblogic.jar
URL: jdbc:metamatrix:<DB>@t3://<host>:<port>

PostgreSQL

Driver Class: org.postgresql.Driver
Class Path: jdbc7.2-1.2.jar
URL: jdbc:postgresql://<host>/<database>

Informix

Driver Class: com.informix.jdbc.IfxDriver
Class Path: ifxjdbc.jar
URL: jdbc:informix-sqli://<host>:<port>:informixserver=myserver

MySQL

Driver Class: org.gjt.mm.mysql.Driver
Class Path: mm.mysql-2.0.X-bin.jar
URL: jdbc:mysql://<host>/<database>

MS SQL Server and Access

Driver Class: sun.jdbc.odbc.JdbcOdbcDriver
Class Path:
URL: jdbc:odbc:<database>
Note that the Class Path: is empty because this driver comes with Sun's Java distribution. You will only have to set up the ODBC database name <database> before using it.