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.

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

For example, to specify a connection URL <strong>for</strong> SQL Server that<br />

includes the user ID <strong>and</strong> password:<br />

<strong>Connect</strong>ion conn = DriverManager.get<strong>Connect</strong>ion<br />

("jdbc:datadirect:sqlserver://server1:1433;User=test;Password=secret");<br />

NOTES:<br />

■<br />

■<br />

The server_name is an IP address or a host name, assuming<br />

that your network resolves host names to IP addresses. You<br />

can test this by using the ping comm<strong>and</strong> to access the host<br />

name <strong>and</strong> verifying that you receive a reply with the correct IP<br />

address.<br />

The numeric value after the server name is the port number<br />

on which the database is listening. The values listed here are<br />

sample defaults. You should determine the port number that<br />

your database is using <strong>and</strong> substitute that value.<br />

You can find the complete list of <strong>Connect</strong>ion URL parameters in<br />

the section "<strong>Connect</strong>ion String Properties" in each driver chapter<br />

of this book.<br />

Testing the <strong>Connect</strong>ion<br />

<strong>DataDirect</strong> Test is a pure Java software component developed by<br />

<strong>DataDirect</strong> Technologies <strong>for</strong> <strong>JDBC</strong> testing. <strong>DataDirect</strong> Test is a<br />

graphical, menu-driven program that allows developers to test<br />

<strong>JDBC</strong> applications. It can also be used as a tool to help developers<br />

learn the <strong>JDBC</strong> API. Its menu items either correspond to specific<br />

<strong>JDBC</strong> functions (<strong>for</strong> example, connecting to a database or passing<br />

a SQL statement) or encapsulate multiple <strong>JDBC</strong> function calls as a<br />

shortcut to per<strong>for</strong>m common tasks (<strong>for</strong> example, returning a<br />

record result). <strong>DataDirect</strong> Test displays the results of all <strong>JDBC</strong><br />

function calls <strong>and</strong> provides fully-commented sample Java <strong>JDBC</strong><br />

code in the same window.<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!