IBM DB2 Manual page 218

Table of Contents

Advertisement

v In a java.util.Properties value in the info parameter of a
v In a java.lang.String value in the url parameter of a
202
Application Programming Guide and Reference for Java
DriverManager.getConnection call.
DriverManager.getConnection call.
Some properties with an int data type have predefined constant field values. You
must resolve constant field values to their integer values before you can use
those values in the url parameter. For example, you cannot use
com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL in a url parameter. However,
you can build a URL string that includes
com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL, and assign the URL string to
a String variable. Then you can use the String variable in the url parameter:
String url =
"jdbc:db2://sysmvs1.stl.ibm.com:5021" +
"user=dbadm;password=dbadm;" +
"traceLevel=" +
(com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL) + ";";
Connection con =
java.sql.DriverManager.getConnection(url);
Related concepts
"How to determine which type of IBM Data Server Driver for JDBC and SQLJ
connectivity to use" on page 17
"LOBs in JDBC applications with the IBM Data Server Driver for JDBC and
SQLJ" on page 49
" IBM Data Server Driver for JDBC and SQLJ client reroute support" on page
84
"Memory use for IBM Data Server Driver for IBM Data Server Driver for JDBC
and SQLJ type 2 connectivity on DB2 for z/OS" on page 98
"LOBs in SQLJ applications with the IBM Data Server Driver for JDBC and
SQLJ" on page 136
"IBM Data Server Driver for JDBC and SQLJ support for SSL" on page 458
Chapter 14, "JDBC connection concentrator and workload balancing," on page
475
Chapter 10, "Security under the IBM Data Server Driver for JDBC and SQLJ,"
on page 447
"User ID and password security under the IBM Data Server Driver for JDBC
and SQLJ" on page 448
"User ID-only security under the IBM Data Server Driver for JDBC and SQLJ"
on page 450
"Encrypted password, user ID, or user ID and password security under the
IBM Data Server Driver for JDBC and SQLJ" on page 451
"Kerberos security under the IBM Data Server Driver for JDBC and SQLJ" on
page 453
"IBM Data Server Driver for JDBC and SQLJ trusted context support" on page
456
Related tasks
"Creating and deploying DataSource objects" on page 19
"Connecting to a data source using the DataSource interface" on page 15
"Connecting to a data source using the DriverManager interface with the IBM
Data Server Driver for JDBC and SQLJ" on page 11
"Keeping prepared statements after commit points" (DB2 Application
Programming and SQL Guide)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents