WebObjects 5: How to Connect to Sybase With EOModeler

This document explains how to install a Sybase JDBC driver and connect to the Sybase server with the EOModeler tool.
Applicable products

Disclaimer for WebObjects 5.1: Sybase is not officially supported in WebObjects 5.1. This document only provides information on how to set up the connection panel in EOModeler so that you can connect to Sybase and reverse engineer an existing database with the EOModeler tool. Since Apple does not provide a Sybase plug-in, the JDBC adaptor functions like a generic JDBC adaptor.

To customize the JDBC adaptor, you can write a custom plug-in. See the Technical Note on how to write a JDBC plug-in at the URL:

http://developer.apple.com/technotes/tn/tn2027.html

Sybase server and JDBC driver used in this document:


Where to Obtain Sybase JDBC Drivers

The Sybase JDBC drivers are available from Sybase's Web site (http://www.sybase.com/). The files can be downloaded for free after you create a "MySybase" account.

Where to install the Sybase JDBC Driver

Assuming that you have downloaded the jconnect52.zip package, unzip the package and place the jconn2.jar file in the appropriate location.

Mac OS X

Place the Sybase jconn2.jar file into /Library/Java/Extensions or a directory listed in your CLASSPATH.

Windows 2000


Specifying the URL and Driver in EOModler's connection panel

The URL should be of the format:

jdbc:sybase:Tds:<hostname>:<port#>

For example, to connect to a Sybase Server on myhost listening on port 4100, the URL will be:

jdbc:sybase:Tds:myhost:4100

You specify databases using the following URL syntax:

jdbc:sybase:Tds:<hostname>:<port#>/<database>

A character set can be specified using the following URL syntax:

jdbc:sybase:Tds:myServer:4100/testDB?charset=ascii_7

Enter the following into the Driver textfield in the EOModeler connection panel:

_Driver: com.sybase.jdbc2.jdbc.SybDriver

Note: The driver entry is needed for WebObjects 5.1 (all platforms) and WebObjects 5.2 (Windows 2000 only)

A typical JDBC Connection Panel in EOModeler looks like figure 1


Figure 1: Typical JDBC Connection Panel in EOModeler

Published Date: Feb 19, 2012