5. Connecting to Ingres Using JDBC
 
Share this page                  
Connecting to Ingres Using JDBC
JDBC Connection URL
JDBC Connection URL has the following format:
jdbc:ingres://<hostname>:<port>/<database>;UID=<user>;PWD=<password>
where:
jdbc:ingres:// 
Connects using the JDBC driver
hostname 
localhost or the name of the computer you are connecting to
port 
The port to connect to (three characters: the Ingres instance ID and the digit 7, for example: II7)
database 
The name of the database you want to access
user 
The user name to connect as
Note:  User ID and password are optional when connecting to a local Data Access Server and the current operating system logged-in user is also a valid Ingres user.
password 
The password
Example JDBC connection strings:
Local installation: jdbc:ingres://localhost:II7/testdb
Remote installation: jdbc:ingres://<hostname>:II7/testdb;UID=userid;PWD=password
For details see DriverManager.getConnection method in the Connectivity Guide.