skip to main content
Using the driver : Connecting from an application : Connecting using the DriverManager : Passing the connection URL
  

Try DataDirect Drivers Now
Passing the connection URL
After setting the CLASSPATH, the required connection information needs to be passed in the form of a connection URL.
jdbc:datadirect:sqlserver://hostname:port[;property=value[;...]]
where:
hostname
is the IP address or host name of the server to which you are connecting. See Using IP addresses for details on using IP addresses.
port
is the number of the TCP/IP port.
property=value
specifies connection properties. For a list of connection properties and their valid values, see Connection property descriptions.

Notes

*Untrusted applets cannot open a socket to a machine other than the originating host.

Example

Connection conn = DriverManager.getConnection
("jdbc:datadirect:sqlserver://MyServer:1433;
User=test;Password=secret;DatabaseName=MyDB");
See Connecting to named instances for instructions on connecting to named instances.