Previous Topic

Next Topic

Java URL Connection String

DriverManager.GetConnection() requires at least one argument, a character string specifying a database connection URL. For the c-treeACE SQL JDBC Driver, the URL takes the following form:

jdbc:ctree:port@host_name:db_name

The URL string has the following components:

jdbc:ctree

An identifying protocol and subprotocol string for the c-treeACE SQL JDBC Driver.

:port

The port number associated with the c-treeACE SQL server on the host system.

@host_name

Name of the server system where the database resides.

:db_name

Name of the database.

For example, the default URL in the sample application is jdbc:ctree:6597@localhost:ctreeSQL. When passed to DriverManager.GetConnection(), this URL specifies that the c-treeACE SQL JDBC Driver be used to connect to the database ctreeSQL on the server named locahost.