Supplying a URL for the server

To connect to a database via jConnect, you need to supply a Universal Resource Locator (URL) for the database. An example given in the section is as follows:

StringBuffer temp = new StringBuffer();
// Use the Sybase jConnect driver...
temp.append("jdbc:sybase:Tds:"); 
// to connect to the supplied machine name...
temp.append(_coninfo);
// on the default port number for ASA...
temp.append(":2638");
// and connect.
System.out.println(temp.toString());
conn = DriverManager.getConnection(temp.toString() , _props );

The URL is put together in the following way:

jdbc:sybase:Tds:machine-name:port-number

The individual components are include:

The connection string must be less than 253 characters in length.