Many additions were made to JDBC support in IBM® i 6.1.
Support for the JDBC 4.0 API with Java SE Version 6
is available using one of the following JAR files: 
You can use the query storage limit property to limit the storage used by a query. This property compares the storage limit you specify to the estimated storage usage of the query. If the estimated storage usage exceeds the specified storage limit, the query is not allowed to run.
setQueryStorageLimit()
public void setQueryStorageLimit(int limit);
getQueryStorageLimit()
public int getQueryStorageLimit()
Systems that run a release of IBM i prior to V6R1 will ignore the getQueryStorageLimit property.
The decimal float (DECFLOAT) inherits favorable properties from both float and decimal data types. Data values of DECFLOAT are stored such that trailing zeros are significant: for example, 2.0 and 2.00 are different binary representations. In SQL comparisons, however, the values are treated as equal.
setDecfloatRoundingMode()
public void setDecfloatRoundingMode(int String mode)
getDecfloatRoundingMode()
public intString getDecfloatRoundingMode()
Web applications need a way to pass end-user-client information to the database server so that more detailed information may be logged. The IBM Toolbox for Java JDBC driver allows an application to override this information by calling the following java.sql.Connection.setClientInfo() methods:
void AS400JDBCConnection.setClientInfo(java.lang.String name,java.lang.String value)
This method sets the value of the client info property specified by name to the value specified by value. See the DatabaseMetadata.getClientInfoProperties method description for the client info properties supported by the IBM Toolbox for Java JDBC driver.void AS400JDBCConnection.setClientInfo(java.util.Properties properties)
This method sets the value of the connection's client info properties. The Properties object contains the names and values of the client info properties to be set. The set of client info properties contained in the properties list replaces the current set of client info properties on the connection. If a property that is currently set on the connection is not present in the properties list, that property is cleared. Specifying an empty properties list will clear all of the properties on the connection.String AS400JDBCConnection.getClientInfo(java.lang.String name)
This method returns the value of the client info property specified by name. This method may return null if the specified client info property has not been set and does not have a default value.Properties AS400JDBCConnection.getClientInfo()
This method returns a list containing the name and current value of each client info property supported by the driver. The value of a client info property may be null if the property has not been set and does not have a default value.ResultSet AS400JDBCDatabaseMetaData.getClientInfoProperties()
This method retrieves a list of the client info properties that the driver supports. The IBM Toolbox for Java JDBC driver returns a result set with the following information:| Name | Maximum length | Default value | Description |
|---|---|---|---|
| ApplicationName | 255 | "" | The name of the application currently utilizing the connection. |
| ClientAccounting | 255 | "" | Accounting information. |
| ClientHostname | 255 | "" | The hostname of the computer the application using the connection is running on. |
| ClientProgramID | 255 | "" | The client program identification. |
| ClientUser | 255 | "" | The name of the user that the application using the connection is performing work for. This may not be the same as the user name that was used in establishing the connection. |
Beginning in V6R1, the maximum length of cursors will be 128 characters. The previous maximum length was 8 characters. An application can set the name of a cursor by calling the java.sql.Statement.setCursorName() method.
Beginning in V6R1, The IBM Toolbox for Java JDBC driver will return a column's default value as a string through the DatabaseMetaData.getColumns() method. If the default value is null, a string with the value 'NULL' will be returned.
The new value for DatabaseMetaData getMaxColumnsInGroupBy( ) is 8000.
The improved batch update support in V6R1 will provide better information to you when you are running a multiple-row batched insert statement. There will be a field in the diagnostics area and SQLCA that will contain the count of successful statements so that you can better determine the location of any errors.
The IBM Toolbox for Java JDBC driver will use this information when creating a java.sql.BatchUpdateException. AS400JDBCStatement and AS400JDBCPreparedStatement will also use this information to return the correct information back from the executeBatch() method.