Example 2: Setting up a connection via the Sybase JDBC driver
Assume that:
- You have already installed the Sybase JDBC driver and have appended the archive file of the driver to the ADDCLASSPATH variable in the file setenv.bat in
<designer_install_root>\bin
.
- The Sybase database server is with the name SybSever, port number 5000, database pubs2, user name sa and password 123456.
- A catalog has been created with a default data source.
Take the following steps to set up a connection which connects JReport Designer to a database via the Sybase JDBC driver:
- Start JReport Designer and open the catalog.
- In the Data tab of the Catalog Browser, expand the node of the default data source, right-click the Relational node and select Add JDBC Connection from the shortcut menu.
- In the Get JDBC Connection Information dialog, uncheck the Use ODBC Data Source checkbox.
- Check the Driver checkbox, and enter the JDBC driver class name com.sybase.jdbc.SybDriver into the Driver text field.
- In the URL text field, specify the URL in the format jdbc:sybase:Tds:<hostname>:<port>/<SID>. In this example, enter jdbc:sybase:Tds:SybServer:5000/pubs2.
- Input the user name sa and password 123456 respectively.
- Click OK to set up the connection.