03.07.2015 Views

DataDirect Connect for JDBC User's Guide and ... - Stylus Studio

DataDirect Connect for JDBC User's Guide and ... - Stylus Studio

DataDirect Connect for JDBC User's Guide and ... - Stylus Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16 Chapter 1 Quick Start <strong>Connect</strong><br />

trying to load the driver. Set your system CLASSPATH to include<br />

the following entries, where driver.jar is the driver jar file (<strong>for</strong><br />

example, sqlserver.jar) <strong>and</strong> install_dir is the path to your<br />

<strong>DataDirect</strong> <strong>Connect</strong> <strong>for</strong> <strong>JDBC</strong> installation directory:<br />

install_dir/lib/base.jar<br />

install_dir/lib/util.jar<br />

install_dir/lib/driver.jar<br />

Windows Example<br />

CLASSPATH=.;c:\connectjdbc\lib\base.jar;c:\connectjdbc\lib\<br />

util.jar;c:\connectjdbc\lib\sqlserver.jar<br />

UNIX Example<br />

CLASSPATH=.;/home/user1/connectjdbc/lib/base.jar;/home/<br />

user1/connectjdbc/lib/util.jar;/home/user1/connectjdbc/lib/<br />

sqlserver.jar<br />

2. Registering the Driver<br />

Registering the driver tells the <strong>JDBC</strong> Driver Manager which driver<br />

to load. When loading a driver using class.<strong>for</strong>Name(), you must<br />

specify the name of the driver. The names of each <strong>DataDirect</strong><br />

<strong>Connect</strong> <strong>for</strong> <strong>JDBC</strong> driver are:<br />

■<br />

■<br />

■<br />

■<br />

■<br />

com.ddtek.jdbc.db2.DB2Driver<br />

com.ddtek.jdbc.in<strong>for</strong>mix.In<strong>for</strong>mixDriver<br />

com.ddtek.jdbc.oracle.OracleDriver<br />

com.ddtek.jdbc.sqlserver.SQLServerDriver<br />

com.ddtek.jdbc.sybase.SybaseDriver<br />

For example:<br />

Class.<strong>for</strong>Name("com.ddtek.jdbc.sqlserver.SQLServerDriver");<br />

<strong>DataDirect</strong> <strong>Connect</strong> <strong>for</strong> <strong>JDBC</strong> User’s <strong>Guide</strong> <strong>and</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!