Open main menu

CDOT Wiki β

Changes

User:Minooz/NexJ/database

13 bytes removed, 15:44, 15 November 2010
JDBC
The first part, jdbc, is a constant. It represents that you are connecting to a JDBC data source. The second part, [drivertype], represents the kind of database you want to connect to. Use postgresql to connect to a PostgreSQL database. The third part is passed off to the driver, which finds the actual database. It takes on one of the following formats:
<code> databasename </code><code>--- //hostname/databasename</code><code> ------ //hostname:portnumber/databasename</code>
In the first case, the PostgreSQL database is running on the local machine, on the default port number. The databasename is the literal name of the database you wish to connect to. The second case is used for when you want to specify a hostname and a database. This also uses the default port number. The third case allows you to specify a port number as well. Even if you use the first type of URL, the JDBC connection will always be made via TCP/IP.
1
edit