Generated by
JDiff

java.sql Documentation Differences

This file contains all the changes in documentation in the package java.sql as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class Array

JDBC 2.0

The mapping in the Java programming language for the SQL type ARRAY. By default an Array object is a transaction -duration reference to an SQL arrayARRAY value. By default an Array object is implemented using an SQL LOCATOR(array) internally which means that an Array object contains a logical pointer to the data in the SQL ARRAY value on the server rather than containing the ARRAY value's data.

The Array interface provides methods for bringing an SQL ARRAY value's data to the client as either an array or a ResultSet object.

If the elements of the SQL ARRAY are a UDT they may be custom mapped. To create a custom mapping a programmer must do two things:

When a type map with an entry for the base type is supplied to the methods getArray and getResultSet the mapping it contains will be used to map the elements of the ARRAY value. If no type map is supplied which would typically be the case the connection's type map is used by default. If the connection's type map or a type map supplied to a method has no entry for the base type the elements are mapped according to the standard mapping.

NOTE: This interface is new in the JDBC 2.0 API.

Class Array, Object getArray()

Retrieves the contents of the SQL arrayARRAY value designated by this Array object in the form of an array in the Java programming language. This version of the method getArray uses the type map associated with the connection for customizations of the type mappings. @return an array in the Java programming language that contains the ordered elements of the SQL ARRAY objectvalue designated by this object @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API
Class Array, Object getArray(Map)

Retrieves the contents of the SQL array designated by this Array object. This usingmethod uses the specified map for type map customizations. Ifunless the base type of the array does not match a user-defined type in map in which case it uses the standard mapping. This version of the method getArray uses either the given type map or the standard mapping; it never uses isthe type map associated usedwith the insteadconnection. @param map a java.util.Map object that contains mappings of SQL type names to classes in the Java programming language @return an array in the Java programming language that contains the ordered elements of the SQL array designated by this object @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API
Class Array, Object getArray(long, int)

Returns an array containing a slice of the SQL arrayARRAY value designated by this Array object beginning with the specified index and containing up to count successive elements of the SQL array. This method uses the type- map associated with the connection for customizations of the type- mappings. @param index the array index of the first element to retrieve; the first element is at index 1 @param count the number of successive SQL array elements to retrieve @return an array containing up to count consecutive elements of the SQL array beginning with element index @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API
Class Array, Object getArray(long, int, Map)

Returns an array containing a slice of the SQL array object designated by this Array object beginning with the specified index and containing up to count successive elements of the SQL array.

This method uses the specified map for type- map customizations unless the base type of the array does not match a user- defined type in map in which case it uses the standard mapping. This version of the method getArray uses either the given type map or the standard mapping; it never uses the type map associated with the connection. @param index the array index of the first element to retrieve; the first element is at index 1 @param count the number of successive SQL array elements to retrieve @param map a java.util.Map object that contains SQL type names and the classes in the Java programming language to which they are mapped @return an array containing up to count consecutive elements of the SQL array designated by this Array object beginning with element index. @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API

Class Array, int getBaseType()

Returns the JDBC type of the elements in the array designated by this Array object. @return a constant from the class java.sql.Types that is the type code for the elements in the array designated by this Array object. @exception SQLException if an error occurs while attempting to access the base type @since 1.2 @see What Is in the JDBC 2.0 API
Class Array, String getBaseTypeName()

Returns the SQL type name of the elements in the array designated by this Array object. If the elements are a built-in type it returns the database-specific type name of the elements. If the elements are a user-defined type (UDT) this method returns the fully-qualified SQL type name. @return a String that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDT @exception SQLException if an error occurs while attempting to access the type name @since 1.2 @see What Is in the JDBC 2.0 API
Class Array, ResultSet getResultSet()

Returns a result set that contains the elements of the arraySQL ARRAY value designated by this Array object. If appropriate the elements of the array are mapped using the connection's type map; otherwise the standard mapping is used.

The result set contains one row for each array element with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices. @return a ResultSet object containing one row for each of the elements in the array designated by this Array object with the rows in ascending order based on the indices. @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API

Class Array, ResultSet getResultSet(Map)

Returns a result set that contains the elements of the arraySQL ARRAY value designated by this Array object. This andmethod uses the givenspecified map to mapfor the arraytype map elements.customizations Ifunless the base type of the array does not match a user-defined type in map in which case it uses the standard mapping. This version of the method getResultSet uses either the given type map or the standard mapping; it isnever uses the type map associated with used insteadthe connection.

The result set contains one row for each array element with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices. @param map contains the mapping of SQL user-defined types to classes in the Java(tm) programming language @return a ResultSet object containing one row for each of the elements in the array designated by this Array object with the rows in ascending order based on the indices. @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API

Class Array, ResultSet getResultSet(long, int)

Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. This method uses the connection's type map to map the elements of the array if the map contains an entry for the base type. Otherwise the standard mapping is used.

The result set has one row for each element of the SQL array designated by this object with the first row containing the element at index index. The result set has up to count rows in ascending order based on the indices. Each row has two columns: The second column stores the element value; the first column stroesstores the index into the array for that element. @param index the array index of the first element to retrieve; the first element is at index 1 @param count the number of successive SQL array elements to retrieve @return a ResultSet object containing up to count consecutive elements of the SQL array designated by this Array object starting at index index. @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API

Class Array, ResultSet getResultSet(long, int, Map)

Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. This method uses the Mapspecified object map to map the elementsfor of the arraytype map customizations unless the base type of the array does not match a user-defined type in map in which case it uses the standard mapping. This version of the method getResultSet uses either the given type map or the standard mapping; it never uses the type map associated with the connection.

The result set has one row for each element of the SQL array designated by this object with the first row containing the element at index index. The result set has up to count rows in ascending order based on the indices. Each row has two columns: The second column stores the element value; the first column stroes the index into the array for that element. @param index the array index of the first element to retrieve; the first element is at index 1 @param count the number of successive SQL array elements to retrieve @param map the Map object that contains the mapping of SQL type names to classes in the Java(tm) programming language @return a ResultSet object containing up to count consecutive elements of the SQL array designated by this Array object starting at index index. @exception SQLException if an error occurs while attempting to access the array @since 1.2 @see What Is in the JDBC 2.0 API


Class BatchUpdateException

JDBC 2.0 An exception thrown when an error occurs during a batch update operation. In addition to the information provided by SQLException a BatchUpdateException provides the update counts for all commands that were executed successfully during the batch update that is all commands that were executed before the error occurred. The order of elements in an array of update counts corresponds to the order in which commands were added to the batch.

After a command in a batch update fails to execute properly and a BatchUpdateException is thrown the driver may or may not continue to process the remaining commands in the batch. If the driver continues processing after a failure the array returned by the method BatchUpdateException.getUpdateCounts will have an element for every command in the batch rather than only elements for the commands that executed successfully before the error. In the case where the driver continues processing commands the array element for any command that failed is -3.

This class is new in the JDBC 2.0 API.

Class BatchUpdateException, constructor BatchUpdateException()

Constructs a BatchUpdateException object with the reason SQLState and update count initialized to null and the vendor code initialized to 0. @since 1.2 @see What Is in the JDBC 2.0 API
Class BatchUpdateException, constructor BatchUpdateException(String, String, int, int[])

Constructs a fully -specified BatchUpdateException object initializing it with the given values. @param reason a description of the error @param SQLState an X/OPEN code identifying the error @param vendorCode an exception code forused by a particular database vendor @param updateCounts an array of int with each element indicating the update count for a SQL command that executed successfully before the exception was thrown @since 1.2 @see What Is in the JDBC 2.0 API
Class BatchUpdateException, constructor BatchUpdateException(String, String, int[])

Constructs a BatchUpdateException initialized with the given arguments (reason SQLState and updateCounts) and 0 for the vendor code. @param reason a description of the exception @param SQLState an X/OPEN code identifying the exception @param updateCounts an array of int with each element indicating the update count for a SQL command that executed successfully before the exception was thrown @since 1.2 @see What Is in the JDBC 2.0 API
Class BatchUpdateException, constructor BatchUpdateException(String, int[])

Constructs a BatchUpdateException initialized with reason updateCounts and null for the SQLState and 0 for the vendorCode. @param reason a description of the exception @param updateCounts an array of int with each element indicating the update count for a SQL command that executed successfully before the exception was thrown @since 1.2 @see What Is in the JDBC 2.0 API
Class BatchUpdateException, constructor BatchUpdateException(int[])

Constructs a BatchUpdateException initialized to null for the reason and SQLState and 0 for the vendor code. @param updateCounts an array of int with each element indicating the update count for a SQL command that executed successfully before the exception was thrown @since 1.2 @see What Is in the JDBC 2.0 API
Class BatchUpdateException, int[] getUpdateCounts()

Retrieves the update count for each update statement in the batch update that executed successfully before this exception occurred. A driver that implements batch updates may or may not continue to process the remaining commands in a batch when one of the commands fails to execute properly. If the driver continues processing commands the array returned by this method will have as many elements as there are commands in the batch; otherwise it will contain an update count for each command that executed successfully before the BatchUpdateException was thrown.

The possible return values for this method were modified for the Java 2 SDK Standard Edition version 1.3. This was done to accommodate the new option of continuing to process commands in a batch update after a BatchUpdateException object has been thrown. @return an array of int containing the update counts for the updates that were executed successfully before this error occurred. Or if the driver continues to process commands after an error one of the following for every command in the batch:

  1. an update count
  2. -2 to indicate that the command executed successfully but the number of rows affected is unknown
  3. -3 to indicate that the command failed to execute successfully
@since 1.3 @see What Is in the JDBC 2.0 API

Class Blob

JDBC 2.0 The representation (mapping) in the JavaTM programming language of an SQL BLOB value. An SQL BLOB is a built-in type that stores a Binary Large Object as a column value in a row of a database table. The driver implements Blob using an SQL locator(BLOB) which means that a Blob object contains a logical pointer to the SQL BLOB data rather than the data itself. A Blob object is valid for the duration of the transaction in which is was created.

Methods in the interfaces ResultSet CallableStatement and PreparedStatement such as getBlob and setBlob allow a programmer to access thean SQL BLOB value. The Blob interface provides methods for getting the length of an SQL BLOB (Binary Large Object) value for materializing a BLOB value on the client and for determining the position of a pattern of bytes within a BLOB value.

This class is new in the JDBC 2.0 API. @since 1.2

Class Blob, InputStream getBinaryStream()

Retrieves the BLOB designated by this Blob instance as a stream. @return a stream containing the BLOB data @exception SQLException if there is an error accessing the BLOB @since 1.2 @see What Is in the JDBC 2.0 API
Class Blob, byte[] getBytes(long, int)

Returns as an array of bytes part or all of the BLOB value that this Blob object designates. The byte array contains up to length consecutive bytes starting at position pos. @param pos the ordinal position of the first byte in the BLOB value to be extracted; the first byte is at position 1 @param length is the number of consecutive bytes to be copied @return a byte array containing up to length consecutive bytes from the BLOB value designated by this Blob object starting with the byte at position pos. @exception SQLException if there is an error accessing the BLOB @since 1.2 @see What Is in the JDBC 2.0 API
Class Blob, long length()

Returns the number of bytes in the BLOB value designated by this Blob object. @return length of the BLOB in bytes @exception SQLException if there is an error accessing the length of the BLOB @since 1.2 @see What Is in the JDBC 2.0 API
Class Blob, long position(Blob, long)

Determines the byte position in the BLOB value designated by this Blob object at which pattern begins. The search begins at position start. @param pattern the Blob object designating the BLOB value for which to search @param start the position in the BLOB value at which to begin searching; the first position is 1 @return the position at which the pattern begins else -1 @exception SQLException if there is an error accessing the BLOB @since 1.2 @see What Is in the JDBC 2.0 API
Class Blob, long position(byte[], long)

Determines the byte position at which the specified byte pattern begins within the BLOB value that this Blob object represents. The search for pattern begins at position start. @param pattern the byte array for which to search @param start the position at which to begin searching; the first position is 1 @return the position at which the pattern appears else -1. @exception SQLException if there is an error accessing the BLOB @since 1.2 @see What Is in the JDBC 2.0 API

Class CallableStatement

The interface used to execute SQL stored procedures. JDBC provides a stored procedure SQL escape syntax that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one form that includes a result parameter and one that does not. If used the result parameter must be registered as an OUT parameter. The other parameters can be used for input output or both. Parameters are referred to sequentially by number. Thewith the first parameter isbeing 1.

 { = call <procedure-name>[<arg1> <arg2> ...]} {call <procedure-name>[<arg1> <arg2> ...]} 

IN parameter values are set using the set methods inherited from PreparedStatement The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the get methods provided here.

A CallableStatement can return one ResultSet or multiple ResultSet objetsobjects. Multiple ResultSet objects are handled using operations inherited from Statement

For maximum portability a call's ResultSet objects and update counts should be processed prior to getting the values of output parameters.

Methods that are new in the JDBC 2.0 API are marked "Since 1.2." @see Connection#prepareCall @see ResultSet

Class CallableStatement, Array getArray(int)

JDBC 2.0 Gets the value of a JDBC ARRAY parameter as an Array object in the Java programming language. @param i the first parameter is 1 the second is 2 and so on @return the parameter value as an Array object in the Java programming language. If the value was SQL NULL the value null is returned. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class CallableStatement, BigDecimal getBigDecimal(int)

JDBC 2.0 Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value in full precision. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class CallableStatement, BigDecimal getBigDecimal(int, int)

Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with scale digits to the right of the decimal point. @param parameterIndex the first parameter is 1 the second is 2 and so on @param scale the number of digits to the right of the decimal point @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs @deprecated
Class CallableStatement, Blob getBlob(int)

JDBC 2.0 Gets the value of a JDBC BLOB parameter as a Blob object in the Java programming language. @param i the first parameter is 1 the second is 2 and so on @return the parameter value as a Blob object in the Java programming language. If the value was SQL NULL the value null is returned. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class CallableStatement, boolean getBoolean(int)

Gets the value of a JDBC BIT parameter as a boolean in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is false. @exception SQLException if a database access error occurs
Class CallableStatement, byte getByte(int)

Gets the value of a JDBC TINYINT parameter as a byte in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is 0. @exception SQLException if a database access error occurs
Class CallableStatement, byte[] getBytes(int)

Gets the value of a JDBC BINARY or VARBINARY parameter as an array of byte vlauresvalues in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs
Class CallableStatement, Clob getClob(int)

JDBC 2.0 Gets the value of a JDBC CLOB parameter as a Clob object in the Java programming language. @param i the first parameter is 1 the second is 2 and so on @return the parameter value as a Clob object in the Java programming language. If the value was SQL NULL the value null is returned. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class CallableStatement, Date getDate(int)

Gets the value of a JDBC DATE parameter as a java.sql.Date object. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs
Class CallableStatement, Date getDate(int, Calendar)

Gets the value of a JDBC DATE parameter as a java.sql.Date object using the given Calendar object to construct the date. With a Calendar object the driver can calculate the date taking into account a custom timezone and locale. If no Calendar object is specified the driver uses the default timezone and locale. @param parameterIndex the first parameter is 1 the second is 2 and so on @param cal the Calendar object the driver will use to construct the date @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs
Class CallableStatement, double getDouble(int)

Gets the value of a JDBC DOUBLE parameter as a double in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is 0. @exception SQLException if a database access error occurs
Class CallableStatement, float getFloat(int)

Gets the value of a JDBC FLOAT parameter as a float in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is 0. @exception SQLException if a database access error occurs
Class CallableStatement, int getInt(int)

Gets the value of a JDBC INTEGER parameter as an int in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is 0. @exception SQLException if a database access error occurs
Class CallableStatement, long getLong(int)

Gets the value of a JDBC BIGINT parameter as a long in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is 0. @exception SQLException if a database access error occurs
Class CallableStatement, Object getObject(int)

Gets the value of a parameter as an objectObject in the Java programming language.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER this method can be used to read database-specific abstract data types. @param parameterIndex Thethe first parameter is 1 the second is 2 and so on @return A java.lang.Object holding the OUT parameter value. @exception SQLException if a database access error occurs @see Types

Class CallableStatement, Object getObject(int, Map)

JDBC 2.0 Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER this method can be used to read database-specific abstract data types. @param i the first parameter is 1 the second is 2 and so on @param map the mapping from SQL type names to Java classes @return a java.lang.Object holding the OUT parameter value. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class CallableStatement, Ref getRef(int)

JDBC 2.0 Gets the value of a JDBC REF(<structured-type>) parameter as a Ref object in the Java programming language. @param i the first parameter is 1 the second is 2 and so on @return the parameter value as a Ref object in the Java programming language. If the value was SQL NULL the value null is returned. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class CallableStatement, short getShort(int)

Gets the value of a JDBC SMALLINT parameter as a short in the Java programming language. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is 0. @exception SQLException if a database access error occurs
Class CallableStatement, String getString(int)

Retrieves the value of a JDBC CHAR VARCHAR or LONGVARCHAR parameter as a String in the Java programming language.

For the fixed-length type JDBC CHAR the String object returned has exactly the same value the JDBC CHAR value had in the database including any padding added by the database. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs

Class CallableStatement, Time getTime(int)

Get the value of a JDBC TIME parameter as a java.sql.Time object. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs
Class CallableStatement, Time getTime(int, Calendar)

Gets the value of a JDBC TIME parameter as a java.sql.Time object using the given Calendar object to construct the time. With a Calendar object the driver can calculate the time taking into account a custom timezone and locale. If no Calendar object is specified the driver uses the default timezone and locale. @param parameterIndex the first parameter is 1 the second is 2 and so on @param cal the Calendar object the driver will use to construct the time @return the parameter value; if the value is SQL NULL the result is null. @exception SQLException if a database access error occurs
Class CallableStatement, Timestamp getTimestamp(int)

Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object. @param parameterIndex the first parameter is 1 the second is 2 and so on @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs
Class CallableStatement, Timestamp getTimestamp(int, Calendar)

Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object using the given Calendar object to construct the Timestamp object. With a Calendar object the driver can calculate the timestamp taking into account a custom timezone and locale. If no Calendar object is specified the driver uses the default timezone and locale. @param parameterIndex the first parameter is 1 the second is 2 and so on @param cal the Calendar object the driver will use to construct the timestamp @return the parameter value. If the value is SQL NULL the result is null. @exception SQLException if a database access error occurs
Class CallableStatement, void registerOutParameter(int, int)

Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

If the JDBC type expected to be returned to this output parameter is specific to this particular database sqlType should be java.sql.Types.OTHER. The method #getObject retrieves the value. @param parameterIndex the first parameter is 1 the second is 2 and so on @param sqlType the JDBC type code defined by java.sql.Types. If the parameter is of JDBC type NumericNUMERIC or DecimalDECIMAL the version of registerOutParameter that accepts a scale value should be used. @exception SQLException if a database access error occurs @see Types

Class CallableStatement, void registerOutParameter(int, int, String)

JDBC 2.0 Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-named or REF output parameter. Examples of user-named types include: STRUCT DISTINCT JAVA_OBJECT and named array types. Before executing a stored procedure call you must explicitly call registerOutParameter to register the type from java.sql.Types for each OUT parameter. For a user-named parameter the fully-qualified SQL type name of the parameter should also be given while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable however applications should always provide these values for user-named and REF parameters. Although it is intended for user-named and REF parameters this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-named or REF type the typeName parameter is ignored.

Note: When reading the value of an out parameter you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type. @param parameterIndex the first parameter is 1 the second is 2 ... @param sqlType a value from java.sql.Types @param typeName the fully-qualified name of an SQL structured type @exception SQLException if a database- access error occurs @see Types @since 1.2 @see What Is in the JDBC 2.0 API

Class CallableStatement, boolean wasNull()

Indicates whether or not the last OUT parameter read had the value of SQL NULL. Note that this method should be called only after calling thea getgetXXX method; otherwise there is no value to use in determining whether it is null or not. @return true if the last parameter read was SQL NULL; false otherwise. @exception SQLException if a database access error occurs

Class Clob

JDBC 2.0 The mapping in the JavaTM programming language for the SQL CLOB type. An SQL CLOB is a built-in type that stores a Character Large Object as a column value in a row of a database table. The driver implements a Clob object using an SQL locator(CLOB) which means that a Clob object contains a logical pointer to the SQL CLOB data rather than the data itself. A Clob object is valid for the duration of the transaction in which it was created.

The Clob interface provides methods for getting the length of an SQL CLOB (Character Large Object) value for materializing a CLOB value on the client and for searching for a substring or CLOB object within a CLOB value. Methods in the interfaces ResultSet CallableStatement and PreparedStatement such as getClob and setClob allow a programmer to access thean SQL CLOB value.

This class is new in the JDBC 2.0 API.

Class Clob, InputStream getAsciiStream()

Gets the CLOB value designated by this Clob object as a stream of Ascii bytes. @return an ascii stream containing the CLOB data @exception SQLException if there is an error accessing the CLOB value @since 1.2 @see What Is in the JDBC 2.0 API
Class Clob, Reader getCharacterStream()

Gets the CLOB value designated by this Clob contentsobject as a Unicode stream. @return a Unicode stream containing the CLOB data @exception SQLException if there is an error accessing the CLOB value @since 1.2 @see What Is in the JDBC 2.0 API
Class Clob, String getSubString(long, int)

Returns a copy of the specified substring in the CLOB value designated by this Clob object. The substring begins at position pos and has up to length consecutive characters. @param pos the first character of the substring to be extracted. The first character is at position 1. @param length the number of consecutive characters to be copied @return a String that is the specified substring in the CLOB value designated by this Clob object @exception SQLException if there is an error accessing the CLOB @since 1.2 @see What Is in the JDBC 2.0 API
Class Clob, long length()

Returns the number of characters in the CLOB value designated by this Clob object. @return length of the CLOB in characters @exception SQLException if there is an error accessing the length of the CLOB @since 1.2 @see What Is in the JDBC 2.0 API
Class Clob, long position(Clob, long)

Determines the character position at which the specified Clob object searchstr appears in this Clob object. The search begins at position start. @param searchstr the Clob object for which to search @param start the position at which to begin searching; the first position is 1 @return the position at which the Clob object appears else -1; the first position is 1 @exception SQLException if there is an error accessing the CLOB value @since 1.2 @see What Is in the JDBC 2.0 API
Class Clob, long position(String, long)

Determines the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object. The search begins at position start. @param searchstr the substring for which to search @param start the position at which to begin searching; the first position is 1 @return the position at which the substring appears else -1; the first position is 1 @exception SQLException if there is an error accessing the CLOB value @since 1.2 @see What Is in the JDBC 2.0 API

Class Connection

A connection (session) with a specific database. Within the context of a Connection SQL statements are executed and results are returned.

A Connection's database is able to provide information describing its tables its supported SQL grammar its stored procedures the capabilities of this connection and so on. This information is obtained with the getMetaData method.

Note: By default the Connection automatically commits changes after executing each statement. If auto commit has been disabled an explicitthe method commit must be donecalled orexplicitly; otherwise database changes will not be saved. @see DriverManager#getConnection @see Statement @see ResultSet @see DatabaseMetaData

Methods that are new in the JDBC 2.0 API are tagged @since 1.2.

Class Connection, Statement createStatement()

Creates a Statement object for sending SQL statements to the database. SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times it is more efficient to use a PreparedStatement JDBC 2object.0

Result sets created using the returned Statement object will by default have forward-only type and read-only concurrency by default. @return a new Statement object @exception SQLException if a database access error occurs

Class Connection, Statement createStatement(int, int)

JDBC 2.0 Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above but it allows the default result set type and result set concurrency type to be overridden. @param resultSetType a result set type; see ResultSet.TYPE_XXX @param resultSetConcurrency a concurrency type; see ResultSet.CONCUR_XXX @return a new Statement object @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class Connection, Map getTypeMap()

JDBC 2.0 Gets the type map object associated with this connection. Unless the application has added an entry to the type map the map returned will be empty. @return the java.util.Map object associated with this Connection object @since 1.2 @see What Is in the JDBC 2.0 API
Class Connection, CallableStatement prepareCall(String)

Creates a CallableStatement object for calling database stored procedures. The CallableStatement object provides methods for setting up its IN and OUT parameters and methods for executing the call to a stored procedure.

Note: This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the method prepareCall is done; others may wait until the CallableStatement object is executed. This has no direct effect on users; however it does affect which method throws certain SQLExceptions. JDBC 2.0 Result sets created using the returned CallableStatement will have forward-only type and read-only concurrency by default. @param sql a SQL statement that may contain one or more ' ' parameter placeholders. Typically this statement is a JDBC function call escape string. @return a new CallableStatement object containing the pre-compiled SQL statement @exception SQLException if a database access error occurs

Class Connection, CallableStatement prepareCall(String, int, int)

JDBC 2.0 Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above but it allows the default result set type and result set concurrency type to be overridden. @param resultSetType a result set type; see ResultSet.TYPE_XXX @param resultSetConcurrency a concurrency type; see ResultSet.CONCUR_XXX @return a new CallableStatement object containing the pre-compiled SQL statement @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class Connection, PreparedStatement prepareStatement(String)

Creates a PreparedStatement object for sending parameterized SQL statements to the database. A SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case the statement may not be sent to the database until the PreparedStatement is executed. This has no direct effect on users; however it does affect which method throws certain SQLExceptions. JDBC 2.0 Result sets created using the returned PreparedStatement will have forward-only type and read-only concurrency by default. @param sql a SQL statement that may contain one or more ' ' IN parameter placeholders @return a new PreparedStatement object containing the pre-compiled statement @exception SQLException if a database access error occurs

Class Connection, PreparedStatement prepareStatement(String, int, int)

JDBC 2.0 Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareStatement method above but it allows the default result set type and result set concurrency type to be overridden. @param resultSetType a result set type; see ResultSet.TYPE_XXX @param resultSetConcurrency a concurrency type; see ResultSet.CONCUR_XXX @return a new PreparedStatement object containing the pre-compiled SQL statement @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class Connection, void setTypeMap(Map)

JDBC 2.0 Installs the given type map as the type map for this connection. The type map will be used for the custom mapping of SQL structured types and distinct types. @param the java.util.Map object to install as the replacement for this Connection object's default type map @since 1.2 @see What Is in the JDBC 2.0 API

Class DatabaseMetaData

Comprehensive information about the database as a whole.

Many of the methods here return lists of information in the form of ResultSet objects. You can use the normal ResultSet methods such as getString and getInt to retrieve the data from these ResultSetsResultSet. If a given form of metadata is not available these methods should throw an SQLException.

Some of these methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String "%" means match any substring of 0 or more characters and "_" means match any one character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to a null ref that argument's criteria will be dropped from the search.

An SQLException will be thrown if a driver does not support a meta data method. In the case of methods that return a ResultSet either a ResultSet (which may be empty) is returned or a SQLException is thrown.

Class DatabaseMetaData, boolean deletesAreDetected(int)

JDBC 2.0 Indicates whether or not a visible row delete can be detected by calling ResultSet.rowDeleted(). If deletesAreDetected() returns false then deleted rows are removed from the result set. @param result set type i.e. ResultSet.TYPE_XXX @return true if changes are detected by the resultset type @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, ResultSet getBestRowIdentifier(String, String, String, int, boolean)

Gets a description of a table's optimal set of columns that uniquely identifies a row. They are ordered by SCOPE.

Each column description has the following columns:

  1. SCOPE short => actual scope of result
    • bestRowTemporary - very temporary while using row
    • bestRowTransaction - valid for remainder of current transaction
    • bestRowSession - valid for remainder of current session
  2. COLUMN_NAME String => column name
  3. DATA_TYPE short => SQL data type from java.sql.Types
  4. TYPE_NAME String => Data source dependent type name for a UDT the type name is fully qualified
  5. COLUMN_SIZE int => precision
  6. BUFFER_LENGTH int => not used
  7. DECIMAL_DIGITS short => scale
  8. PSEUDO_COLUMN short => is this a pseudo column like an Oracle ROWID
    • bestRowUnknown - may or may not be pseudo column
    • bestRowNotPseudo - is NOT a pseudo column
    • bestRowPseudo - is a pseudo column
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schema a schema name; "" retrieves those without a schema @param table a table name @param scope the scope of interest; use same values as SCOPE @param nullable include columns that are nullable @return ResultSet - each row is a column description @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getCatalogs()

Gets the catalog names available in this database. The results are ordered by catalog name.

The catalog column is:

  1. TABLE_CAT String => catalog name
@return ResultSet - each row has a single String column that is a catalog name @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getColumnPrivileges(String, String, String, String)

Gets a description of the access rights for a table's columns.

Only privileges matching the column name criteria are returned. They are ordered by COLUMN_NAME and PRIVILEGE.

Each privilige description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. COLUMN_NAME String => column name
  5. GRANTOR => grantor of access (may be null)
  6. GRANTEE String => grantee of access
  7. PRIVILEGE String => name of access (SELECT INSERT UPDATE REFRENCES ...)
  8. IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schema a schema name; "" retrieves those without a schema @param table a table name @param columnNamePattern a column name pattern @return ResultSet - each row is a column privilege description @exception SQLException if a database access error occurs @see #getSearchStringEscape
Class DatabaseMetaData, ResultSet getColumns(String, String, String, String)

Gets a description of table columns available in the specified catalog.

Only column descriptions matching the catalog schema table and column name criteria are returned. They are ordered by TABLE_SCHEM TABLE_NAME and ORDINAL_POSITION.

Each column description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. COLUMN_NAME String => column name
  5. DATA_TYPE short => SQL type from java.sql.Types
  6. TYPE_NAME String => Data source dependent type name for a UDT the type name is fully qualified
  7. COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters for numeric or decimal types this is precision.
  8. BUFFER_LENGTH is not used.
  9. DECIMAL_DIGITS int => the number of fractional digits
  10. NUM_PREC_RADIX int => Radix (typically either 10 or 2)
  11. NULLABLE int => is NULL allowed
    • columnNoNulls - might not allow NULL values
    • columnNullable - definitely allows NULL values
    • columnNullableUnknown - nullability unknown
  12. REMARKS String => comment describing column (may be null)
  13. COLUMN_DEF String => default value (may be null)
  14. SQL_DATA_TYPE int => unused
  15. SQL_DATETIME_SUB int => unused
  16. CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
  17. ORDINAL_POSITION int => index of column in table (starting at 1)
  18. IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schemaPattern a schema name pattern; "" retrieves those without a schema @param tableNamePattern a table name pattern @param columnNamePattern a column name pattern @return ResultSet - each row is a column description @exception SQLException if a database access error occurs @see #getSearchStringEscape
Class DatabaseMetaData, Connection getConnection()

JDBC 2.0 Retrieves the connection that produced this metadata object. @return the connection that produced this metadata object @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, ResultSet getCrossReference(String, String, String, String, String, String)

Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME and KEY_SEQ.

Each foreign key column description has the following columns:

  1. PKTABLE_CAT String => primary key table catalog (may be null)
  2. PKTABLE_SCHEM String => primary key table schema (may be null)
  3. PKTABLE_NAME String => primary key table name
  4. PKCOLUMN_NAME String => primary key column name
  5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
  6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
  7. FKTABLE_NAME String => foreign key table name being exported
  8. FKCOLUMN_NAME String => foreign key column name being exported
  9. KEY_SEQ short => sequence number within foreign key
  10. UPDATE_RULE short => What happens to foreign key when primary is updated:
    • importedNoAction - do not allow update of primary key if it has been imported
    • importedKeyCascade - change imported key to agree with primary key update
    • importedKeySetNull - change imported key to NULL if its primary key has been updated
    • importedKeySetDefault - change imported key to default values if its primary key has been updated
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
  11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
    • importedKeyNoAction - do not allow delete of primary key if it has been imported
    • importedKeyCascade - delete rows that import a deleted key
    • importedKeySetNull - change imported key to NULL if its primary key has been deleted
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
    • importedKeySetDefault - change imported key to default if its primary key has been deleted
  12. FK_NAME String => foreign key name (may be null)
  13. PK_NAME String => primary key name (may be null)
  14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
    • importedKeyInitiallyDeferred - see SQL92 for definition
    • importedKeyInitiallyImmediate - see SQL92 for definition
    • importedKeyNotDeferrable - see SQL92 for definition
@param primaryCatalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param primarySchema a schema name; "" retrieves those without a schema @param primaryTable the table name that exports the key @param foreignCatalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param foreignSchema a schema name; "" retrieves those without a schema @param foreignTable the table name that imports the key @return ResultSet - each row is a foreign key column description @exception SQLException if a database access error occurs @see #getImportedKeys
Class DatabaseMetaData, ResultSet getExportedKeys(String, String, String)

Gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table). They are ordered by FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME and KEY_SEQ.

Each foreign key column description has the following columns:

  1. PKTABLE_CAT String => primary key table catalog (may be null)
  2. PKTABLE_SCHEM String => primary key table schema (may be null)
  3. PKTABLE_NAME String => primary key table name
  4. PKCOLUMN_NAME String => primary key column name
  5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
  6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
  7. FKTABLE_NAME String => foreign key table name being exported
  8. FKCOLUMN_NAME String => foreign key column name being exported
  9. KEY_SEQ short => sequence number within foreign key
  10. UPDATE_RULE short => What happens to foreign key when primary is updated:
    • importedNoAction - do not allow update of primary key if it has been imported
    • importedKeyCascade - change imported key to agree with primary key update
    • importedKeySetNull - change imported key to NULL if its primary key has been updated
    • importedKeySetDefault - change imported key to default values if its primary key has been updated
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
  11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
    • importedKeyNoAction - do not allow delete of primary key if it has been imported
    • importedKeyCascade - delete rows that import a deleted key
    • importedKeySetNull - change imported key to NULL if its primary key has been deleted
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
    • importedKeySetDefault - change imported key to default if its primary key has been deleted
  12. FK_NAME String => foreign key name (may be null)
  13. PK_NAME String => primary key name (may be null)
  14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
    • importedKeyInitiallyDeferred - see SQL92 for definition
    • importedKeyInitiallyImmediate - see SQL92 for definition
    • importedKeyNotDeferrable - see SQL92 for definition
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schema a schema name; "" retrieves those without a schema @param table a table name @return ResultSet - each row is a foreign key column description @exception SQLException if a database access error occurs @see #getImportedKeys
Class DatabaseMetaData, ResultSet getImportedKeys(String, String, String)

Gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). They are ordered by PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME and KEY_SEQ.

Each primary key column description has the following columns:

  1. PKTABLE_CAT String => primary key table catalog being imported (may be null)
  2. PKTABLE_SCHEM String => primary key table schema being imported (may be null)
  3. PKTABLE_NAME String => primary key table name being imported
  4. PKCOLUMN_NAME String => primary key column name being imported
  5. FKTABLE_CAT String => foreign key table catalog (may be null)
  6. FKTABLE_SCHEM String => foreign key table schema (may be null)
  7. FKTABLE_NAME String => foreign key table name
  8. FKCOLUMN_NAME String => foreign key column name
  9. KEY_SEQ short => sequence number within foreign key
  10. UPDATE_RULE short => What happens to foreign key when primary is updated:
    • importedNoAction - do not allow update of primary key if it has been imported
    • importedKeyCascade - change imported key to agree with primary key update
    • importedKeySetNull - change imported key to NULL if its primary key has been updated
    • importedKeySetDefault - change imported key to default values if its primary key has been updated
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
  11. DELETE_RULE short => What happens to the foreign key when primary is deleted.
    • importedKeyNoAction - do not allow delete of primary key if it has been imported
    • importedKeyCascade - delete rows that import a deleted key
    • importedKeySetNull - change imported key to NULL if its primary key has been deleted
    • importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility)
    • importedKeySetDefault - change imported key to default if its primary key has been deleted
  12. FK_NAME String => foreign key name (may be null)
  13. PK_NAME String => primary key name (may be null)
  14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit
    • importedKeyInitiallyDeferred - see SQL92 for definition
    • importedKeyInitiallyImmediate - see SQL92 for definition
    • importedKeyNotDeferrable - see SQL92 for definition
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schema a schema name; "" retrieves those without a schema @param table a table name @return ResultSet - each row is a primary key column description @exception SQLException if a database access error occurs @see #getExportedKeys
Class DatabaseMetaData, ResultSet getIndexInfo(String, String, String, boolean, boolean)

Gets a description of a table's indices and statistics. They are ordered by NON_UNIQUE TYPE INDEX_NAME and ORDINAL_POSITION.

Each index column description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. NON_UNIQUE boolean => Can index values be non-unique false when TYPE is tableIndexStatistic
  5. INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is tableIndexStatistic
  6. INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
  7. TYPE short => index type:
    • tableIndexStatistic - this identifies table statistics that are returned in conjuction with a table's index descriptions
    • tableIndexClustered - this is a clustered index
    • tableIndexHashed - this is a hashed index
    • tableIndexOther - this is some other style of index
  8. ORDINAL_POSITION short => column sequence number within index; zero when TYPE is tableIndexStatistic
  9. COLUMN_NAME String => column name; null when TYPE is tableIndexStatistic
  10. ASC_OR_DESC String => column sort sequence "A" => ascending "D" => descending may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic
  11. CARDINALITY int => When TYPE is tableIndexStatistic then this is the number of rows in the table; otherwise it is the number of unique values in the index.
  12. PAGES int => When TYPE is tableIndexStatisic then this is the number of pages used for the table otherwise it is the number of pages used for the current index.
  13. FILTER_CONDITION String => Filter condition if any. (may be null)
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schema a schema name; "" retrieves those without a schema @param table a table name @param unique when true return only indices for unique values; when false return indices regardless of whether unique or not @param approximate when true result is allowed to reflect approximate or out of data values; when false results are requested to be accurate @return ResultSet - each row is an index column description @exception SQLException if a database access error occurs
Class DatabaseMetaData, int getMaxIndexLength()

What'sRetrieves the maximum lengthnumber of bytes for an index (inincluding bytes)all of the parts of the index. @return max index length in bytes which includes the composite of all the constituent parts of the index; a result of zero means that there is no limit or the limit is not known @exception SQLException if a database access error occurs
Class DatabaseMetaData, int getMaxStatementLength()

What's the maximum length of aan SQL statement @return max length in bytes; a result of zero means that there is no limit or the limit is not known @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getPrimaryKeys(String, String, String)

Gets a description of a table's primary key columns. They are ordered by COLUMN_NAME.

Each primary key column description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. COLUMN_NAME String => column name
  5. KEY_SEQ short => sequence number within primary key
  6. PK_NAME String => primary key name (may be null)
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schema a schema name; "" retrieves those without a schema @param table a table name @return ResultSet - each row is a primary key column description @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getProcedureColumns(String, String, String, String)

Gets a description of a catalog's stored procedure parameters and result columns.

Only descriptions matching the schema procedure and parameter name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME. Within this the return value if any is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.

Each row in the ResultSet is a parameter description or column description with the following fields:

  1. PROCEDURE_CAT String => procedure catalog (may be null)
  2. PROCEDURE_SCHEM String => procedure schema (may be null)
  3. PROCEDURE_NAME String => procedure name
  4. COLUMN_NAME String => column/parameter name
  5. COLUMN_TYPE Short => kind of column/parameter:
    • procedureColumnUnknown - nobody knows
    • procedureColumnIn - IN parameter
    • procedureColumnInOut - INOUT parameter
    • procedureColumnOut - OUT parameter
    • procedureColumnReturn - procedure return value
    • procedureColumnResult - result column in ResultSet
  6. DATA_TYPE short => SQL type from java.sql.Types
  7. TYPE_NAME String => SQL type name for a UDT type the type name is fully qualified
  8. PRECISION int => precision
  9. LENGTH int => length in bytes of data
  10. SCALE short => scale
  11. RADIX short => radix
  12. NULLABLE short => can it contain NULL
    • procedureNoNulls - does not allow NULL values
    • procedureNullable - allows NULL values
    • procedureNullableUnknown - nullability unknown
  13. REMARKS String => comment describing parameter/column

Note: Some databases may not return the column descriptions for a procedure. Additional columns beyond REMARKS can be defined by the database. @param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schemaPattern a schema name pattern; "" retrieves those without a schema @param procedureNamePattern a procedure name pattern @param columnNamePattern a column name pattern @return ResultSet - each row describes a stored procedure parameter or column @exception SQLException if a database access error occurs @see #getSearchStringEscape

Class DatabaseMetaData, ResultSet getProcedures(String, String, String)

Gets a description of the stored procedures available in a catalog.

Only procedure descriptions matching the schema and procedure name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME.

Each procedure description has the the following columns:

  1. PROCEDURE_CAT String => procedure catalog (may be null)
  2. PROCEDURE_SCHEM String => procedure schema (may be null)
  3. PROCEDURE_NAME String => procedure name
  4. reserved for future use
  5. reserved for future use
  6. reserved for future use
  7. REMARKS String => explanatory comment on the procedure
  8. PROCEDURE_TYPE short => kind of procedure:
    • procedureResultUnknown - May return a result
    • procedureNoResult - Does not return a result
    • procedureReturnsResult - Returns a result
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schemaPattern a schema name pattern; "" retrieves those without a schema @param procedureNamePattern a procedure name pattern @return ResultSet - each row is a procedure description @exception SQLException if a database access error occurs @see #getSearchStringEscape
Class DatabaseMetaData, ResultSet getSchemas()

Gets the schema names available in this database. The results are ordered by schema name.

The schema column is:

  1. TABLE_SCHEM String => schema name
@return ResultSet - each row has a single String column that is a schema name @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getTablePrivileges(String, String, String)

Gets a description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in the table. It would be wrong to assume that this priviledge applies to all columns (this may be true for some systems but is not true for all.)

Only privileges matching the schema and table name criteria are returned. They are ordered by TABLE_SCHEM TABLE_NAME and PRIVILEGE.

Each privilige description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. GRANTOR => grantor of access (may be null)
  5. GRANTEE String => grantee of access
  6. PRIVILEGE String => name of access (SELECT INSERT UPDATE REFRENCES ...)
  7. IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schemaPattern a schema name pattern; "" retrieves those without a schema @param tableNamePattern a table name pattern @return ResultSet - each row is a table privilege description @exception SQLException if a database access error occurs @see #getSearchStringEscape
Class DatabaseMetaData, ResultSet getTableTypes()

Gets the table types available in this database. The results are ordered by table type.

The table type is:

  1. TABLE_TYPE String => table type. Typical types are "TABLE" "VIEW" "SYSTEM TABLE" "GLOBAL TEMPORARY" "LOCAL TEMPORARY" "ALIAS" "SYNONYM".
@return ResultSet - each row has a single String column that is a table type @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getTables(String, String, String, String[])

Gets a description of tables available in a catalog.

Only table descriptions matching the catalog schema table name and type criteria are returned. They are ordered by TABLE_TYPE TABLE_SCHEM and TABLE_NAME.

Each table description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. TABLE_TYPE String => table type. Typical types are "TABLE" "VIEW" "SYSTEM TABLE" "GLOBAL TEMPORARY" "LOCAL TEMPORARY" "ALIAS" "SYNONYM".
  5. REMARKS String => explanatory comment on the table

Note: Some databases may not return information for all tables. @param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schemaPattern a schema name pattern; "" retrieves those without a schema @param tableNamePattern a table name pattern @param types a list of table types to include; null returns all types @return ResultSet - each row is a table description @exception SQLException if a database access error occurs @see #getSearchStringEscape

Class DatabaseMetaData, ResultSet getTypeInfo()

Gets a description of all the standard SQL types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps to the corresponding JDBC SQL type.

Each type description has the following columns:

  1. TYPE_NAME String => Type name
  2. DATA_TYPE short => SQL data type from java.sql.Types
  3. PRECISION int => maximum precision
  4. LITERAL_PREFIX String => prefix used to quote a literal (may be null)
  5. LITERAL_SUFFIX String => suffix used to quote a literal (may be null)
  6. CREATE_PARAMS String => parameters used in creating the type (may be null)
  7. NULLABLE short => can you use NULL for this type
    • typeNoNulls - does not allow NULL values
    • typeNullable - allows NULL values
    • typeNullableUnknown - nullability unknown
  8. CASE_SENSITIVE boolean=> is it case sensitive
  9. SEARCHABLE short => can you use "WHERE" based on this type:
    • typePredNone - No support
    • typePredChar - Only supported with WHERE .. LIKE
    • typePredBasic - Supported except for WHERE .. LIKE
    • typeSearchable - Supported for all WHERE ..
  10. UNSIGNED_ATTRIBUTE boolean => is it unsigned
  11. FIXED_PREC_SCALE boolean => can it be a money value
  12. AUTO_INCREMENT boolean => can it be used for an auto-increment value
  13. LOCAL_TYPE_NAME String => localized version of type name (may be null)
  14. MINIMUM_SCALE short => minimum scale supported
  15. MAXIMUM_SCALE short => maximum scale supported
  16. SQL_DATA_TYPE int => unused
  17. SQL_DATETIME_SUB int => unused
  18. NUM_PREC_RADIX int => usually 2 or 10
@return ResultSet - each row is aan SQL type description @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getUDTs(String, String, String, int[])

JDBC 2.0 Gets a description of the user-defined types defined in a particular schema. Schema-specific UDTs may have type JAVA_OBJECT STRUCT or DISTINCT.

Only types matching the catalog schema type name and type criteria are returned. They are ordered by DATA_TYPE TYPE_SCHEM and TYPE_NAME. The type name parameter may be a fully-qualified name. In this case the catalog and schemaPattern parameters are ignored.

Each type description has the following columns:

  1. TYPE_CAT String => the type's catalog (may be null)
  2. TYPE_SCHEM String => type's schema (may be null)
  3. TYPE_NAME String => type name
  4. CLASS_NAME String => Java class name
  5. DATA_TYPE String => type value defined in java.sql.Types. One of JAVA_OBJECT STRUCT or DISTINCT
  6. REMARKS String => explanatory comment on the type

Note: If the driver does not support UDTs an empty result set is returned. @param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schemaPattern a schema name pattern; "" retrieves those without a schema @param typeNamePattern a type name pattern; may be a fully-qualified name @param types a list of user-named types to include (JAVA_OBJECT STRUCT or DISTINCT); null returns all types @return ResultSet - each row is a type description @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class DatabaseMetaData, ResultSet getVersionColumns(String, String, String)

Gets a description of a table's columns that are automatically updated when any value in a row is updated. They are unordered.

Each column description has the following columns:

  1. SCOPE short => is not used
  2. COLUMN_NAME String => column name
  3. DATA_TYPE short => SQL data type from java.sql.Types
  4. TYPE_NAME String => Data source dependent type name
  5. COLUMN_SIZE int => precision
  6. BUFFER_LENGTH int => length of column value in bytes
  7. DECIMAL_DIGITS short => scale
  8. PSEUDO_COLUMN short => is this a pseudo column like an Oracle ROWID
    • versionColumnUnknown - may or may not be pseudo column
    • versionColumnNotPseudo - is NOT a pseudo column
    • versionColumnPseudo - is a pseudo column
@param catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param schema a schema name; "" retrieves those without a schema @param table a table name @return ResultSet - each row is a column description @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean insertsAreDetected(int)

JDBC 2.0 Indicates whether or not a visible row insert can be detected by calling ResultSet.rowInserted(). @param result set type i.e. ResultSet.TYPE_XXX @return true if changes are detected by the resultset type @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean nullPlusNonNullIsNull()

Are concatenations between NULL and non-NULL values NULL AFor SQL-92 compliance a JDBC CompliantTMtechnology-enabled driver always returnswill return true. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean othersDeletesAreVisible(int)

JDBC 2.0 Indicates whether deletes made by others are visible. @param result set type i.e. ResultSet.TYPE_XXX @return true if deletes made by others are visible for the result set type; false otherwise @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean othersInsertsAreVisible(int)

JDBC 2.0 Indicates whether inserts made by others are visible. @param result set type i.e. ResultSet.TYPE_XXX @return true if updates are visible for the result set type @return true if inserts made by others are visible for the result set type; false otherwise @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean othersUpdatesAreVisible(int)

JDBC 2.0 Indicates whether updates made by others are visible. @param result set type i.e. ResultSet.TYPE_XXX @return true if updates made by others are visible for the result set type; false otherwise @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean ownDeletesAreVisible(int)

JDBC 2.0 Indicates whether a result set's own deletes are visible. @param result set type i.e. ResultSet.TYPE_XXX @return true if deletes are visible for the result set type; false otherwise @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean ownInsertsAreVisible(int)

JDBC 2.0 Indicates whether a result set's own inserts are visible. @param result set type i.e. ResultSet.TYPE_XXX @return true if inserts are visible for the result set type; false otherwise @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean ownUpdatesAreVisible(int)

JDBC 2.0 Indicates whether a result set's own updates are visible. @param result set type i.e. ResultSet.TYPE_XXX @return true if updates are visible for the result set type; false otherwise @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean supportsBatchUpdates()

JDBC 2.0 Indicates whether the driver supports batch updates. @return true if the driver supports batch updates; false otherwise @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean supportsMultipleResultSets()

Are multiple ResultSetsResultSet from a single execute supported @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsResultSetConcurrency(int, int)

JDBC 2.0 Does the database support the concurrency type in combination with the given result set type @param type defined in java.sql.ResultSet @param concurrency type defined in java.sql.ResultSet @return true if so; false otherwise @exception SQLException if a database access error occurs @see Connection @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean supportsResultSetType(int)

JDBC 2.0 Does the database support the given result set type @param type defined in java.sql.ResultSet @return true if so; false otherwise @exception SQLException if a database access error occurs @see Connection @since 1.2 @see What Is in the JDBC 2.0 API
Class DatabaseMetaData, boolean updatesAreDetected(int)

JDBC 2.0 Indicates whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated. @param result set type i.e. ResultSet.TYPE_XXX @return true if changes are detected by the result set type; false otherwise @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class Date, String toString()

Formats a date in JDBCthe date escape format yyyy-mm-dd.

NOTE: To specify a date format for the class SimpleDateFormat use "yyyy.MM.dd" rather than "yyyy-mm-dd". In the context of SimpleDateFormat "mm" indicates minutes rather than the month. For example:

 Format Pattern Result -------------- ------- "yyyy.MM.dd G 'at' hh:mm:ss z" ->> 1996.07.10 AD at 15:08:56 PDT 
@return a String in yyyy-mm-dd format

Class DriverManager

The basic service for managing a set of JDBC drivers.
NOTE: The DataSource interface new in the JDBC 2.0 API provides another way to connect to a data source. The use of a DataSource object is the preferred means of connecting to a data source.

As part of its initialization the DriverManager class will attempt to load the driver classes referenced in the "jdbc.drivers" system property. This allows a user to customize the JDBC Drivers used by their applications. For example in your ~/.hotjava/properties file you might specify:

 jdbc.drivers=foo.bah.Driver:wombat.sql.Driver:bad.taste.ourDriver 
A program can also explicitly load JDBC drivers at any time. For example the my.sql.Driver is loaded with the following statement:
 Class.forName("my.sql.Driver"); 

When the method getConnection is called the DriverManager will attempt to locate a suitable driver from amongst those loaded at initialization and those loaded explicitly using the same classloader as the current applet or application.

Starting with the Java 2 SDK Standard Edition version 1.3 a logging stream can be set only if the proper permission has been granted. Normally this will be done with the tool PolicyTool which can be used to grant permission java.sql.SQLPermission "setLog". @see Driver @see Connection

Some methods in this class are new in the JDBC 2.0 API. They are marked with "since 1.2". API marked "since 1.3" is new in the JDBC 2.0 API and is included in the Java 2 SDK Standard Edition version 1.3.

Class DriverManager, void deregisterDriver(Driver)

Drops a Driver from the DriverManager's list. Applets can only deregister Drivers from their own classloaders. @param driver the JDBC Driver to drop @exception SQLException if a database access error occurs
Class DriverManager, Connection getConnection(String)

Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers. @param url a database url of the form jdbc:subprotocol:subname @return a Connectionconnection to the URL @exception SQLException if a database access error occurs
Class DriverManager, Connection getConnection(String, Properties)

Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers. @param url a database url of the form jdbc:subprotocol:subname @param info a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included @return a Connection to the URL @exception SQLException if a database access error occurs
Class DriverManager, Connection getConnection(String, String, String)

Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers. @param url a database url of the form jdbc:subprotocol:subname @param user the database user on whose behalf the Connectionconnection is being made @param password the user's password @return a Connectionconnection to the URL @exception SQLException if a database access error occurs
Class DriverManager, Driver getDriver(String)

Attempts to locate a driver that understands the given URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers. @param url a database urlURL of the form jdbc:subprotocol:subname @return a Driver object representing a driver that can connect to the given URL @exception SQLException if a database access error occurs
Class DriverManager, PrintStream getLogStream()

Gets the logging/tracing PrintStream that is used by the DriverManager and all drivers. @return the logging/tracing PrintStream; if disabled is null @deprecated
Class DriverManager, PrintWriter getLogWriter()

JDBC 2.0 Gets the log writer. The getLogWriter and setLogWriter methods should be used instead of the old get/setlogStream methods which are deprecated. @return a java.io.PrintWriter object @see What Is in the JDBC 2.0 API @since 1.2
Class DriverManager, void registerDriver(Driver)

Registers the given driver with the DriverManager. A newly-loaded driver class should call the method registerDriver to make itself known to the DriverManager. @param driver the new JDBC Driver that is to be registered with the DriverManager @exception SQLException if a database access error occurs
Class DriverManager, void setLogStream(PrintStream)

Sets the logging/tracing PrintStream that is used by the DriverManager and all drivers.

In the Java 2 SDK Standard Edition version 1.3 release this method checks to see that there is an SQLPermission object before setting the logging stream. If a SecurityManager exists and its checkPermission method denies setting the log writer this method throws a java.lang.SecurityException. @param out the new logging/tracing PrintStream; to disable set to null @deprecated @throws SecurityException if a security manager exists and its checkPermission method denies setting the log stream. @see SecurityManager#checkPermission

Class DriverManager, void setLogWriter(PrintWriter)

JDBC 2.0 Sets the logging/tracing WriterPrintWriter object that is used by the DriverManager and all drivers.

There is a minor versioning problem introducedcreated by the introduction of the method setLogWriter. The method setLogWriter cannot create a PrintStream object that will be returned by getLogStream---the Java platform does not provide a backward conversion. SoAs a result a new application that uses setLogWriter and also uses a JDBC 1.0 driver that uses getLogStream will likely not see debugging information written by that driver.

In the Java 2 SDK Standard Edition version 1.3 release this method checks to see that there is an SQLPermission object before setting the logging stream. If a SecurityManager exists and its checkPermission method denies setting the log writer this method throws a java.lang.SecurityException. @param out the new logging/tracing PrintStream object; null to disable setlogging and totracing null@throws SecurityException if a security manager exists and its checkPermission method denies setting the log writer @see SecurityManager#checkPermission @see What Is in the JDBC 2.0 API @since 1.2


Class PreparedStatement

An object that represents a precompiled SQL statement.

A SQL statement is pre-compiledprecompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

Note: The setXXX methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance if the IN parameter has SQL type Integer then the method setInt should be used.

If arbitrary parameter type conversions are required the method setObject should be used with a target SQL type.
Example of setting a parameter; con is an active connection

 PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = WHERE ID = "); pstmt.setBigDecimal(1 153833.00) pstmt.setInt(2 110592) 
@see Connection#prepareStatement @see ResultSet

Some of the methods in this interface are new in the JDBC 2.0 API.

Class PreparedStatement, void addBatch()

JDBC 2.0 Adds a set of parameters to thethis PreparedStatement object's batch of commands. @exception SQLException if a database access error occurs @see Statement#addBatch @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void clearParameters()

Clears the current parameter values immediately.

In general parameter values remain in force for repeated use of a Statementstatement. Setting a parameter value automatically clears its previous value. However in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling the method clearParameters. @exception SQLException if a database access error occurs

Class PreparedStatement, boolean execute()

Executes any kind of SQL statement. Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by the methods executeQuery and executeUpdate. @exception SQLException if a database access error occurs @see Statement#execute
Class PreparedStatement, ResultSet executeQuery()

Executes the SQL query in this PreparedStatement object and returns the result set generated by the query. @return a ResultSet object that contains the data produced by the query; never null @exception SQLException if a database access error occurs
Class PreparedStatement, ResultSetMetaData getMetaData()

JDBC 2.0 Gets the number types and properties of a ResultSet object's columns. @return the description of a ResultSet object's columns @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setArray(int, Array)

JDBCSets 2the designated parameter to the given Array object.0 Sets an Array parameter. @param i the first parameter is 1 the second is 2 ... @param x an Array object representingthat maps an SQL arrayARRAY value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setAsciiStream(int, InputStream, int)

Sets the designated parameter to the given input stream which will have the specified number of bytes. When a very large ASCII value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.InputStream. JDBCData will read thebe dataread from the stream as needed until it reaches end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the Java input stream that contains the ASCII parameter value @param length the number of bytes in the stream @exception SQLException if a database access error occurs

Class PreparedStatement, void setBigDecimal(int, BigDecimal)

Sets the designated parameter to a java.langmath.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setBinaryStream(int, InputStream, int)

Sets the designated parameter to the given input stream which will have the specified number of bytes. When a very large binary value is input to a LONGVARBINARY parameter it may be more practical to send it via a java.io.InputStream object. JDBC will read the dataThe data will be read from the stream as needed until it reaches end-of-file is reached.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the java input stream which contains the binary parameter value @param length the number of bytes in the stream @exception SQLException if a database access error occurs

Class PreparedStatement, void setBlob(int, Blob)

JDBC 2.0 Sets a BLOBthe designated parameter to the given Blob object. @param i the first parameter is 1 the second is 2 ... @param x ana Blob object representingthat amaps an SQL BLOB value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setBoolean(int, boolean)

Sets the designated parameter to a Java boolean value. The driver converts this to an SQL BIT value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setByte(int, byte)

Sets the designated parameter to a Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setBytes(int, byte[])

Sets the designated parameter to a Java array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARYsVARBINARY values) when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setCharacterStream(int, Reader, int)

JDBC 2.0 Sets the designated parameter to the given Reader object which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.Reader object. JDBC will read the dataThe data will be read from the stream as needed until it reaches end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the java reader which contains the UNICODE data @param length the number of characters in the stream @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class PreparedStatement, void setClob(int, Clob)

JDBC 2.0 Sets a CLOBthe designated parameter to the given Clob object. @param i the first parameter is 1 the second is 2 ... @param x ana Clob object representingthat amaps an SQL CLOB value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setDate(int, Date)

Sets the designated parameter to a java.sql.Date value. The driver converts this to an SQL DATE value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setDate(int, Date, Calendar)

JDBC 2.0 Sets the designated parameter to athe given java.sql.Date value using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value which the driver then sends to the database. With a a Calendar object the driver can calculate the date taking into account a custom timezone and locale. If no Calendar object is specified the driver uses the default timezone andwhich is that of the virtual machine running the localeapplication. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @param cal the Calendar object the driver will use to construct the date @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setDouble(int, double)

Sets the designated parameter to a Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setFloat(int, float)

Sets the designated parameter to a Java float value. The driver converts this to an SQL FLOAT value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setInt(int, int)

Sets the designated parameter to a Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setLong(int, long)

Sets the designated parameter to a Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setNull(int, int)

Sets the designated parameter to SQL NULL.

Note: You must specify the parameter's SQL type. @param parameterIndex the first parameter is 1 the second is 2 ... @param sqlType the SQL type code defined in java.sql.Types @exception SQLException if a database access error occurs

Class PreparedStatement, void setNull(int, int, String)

JDBC 2.0 Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-nameddefined types and REF type parameters. Examples of user-nameddefined types include: STRUCT DISTINCT JAVA_OBJECT and named array types.

Note: To be portable applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-nameddefined type the name is the type name of the parameter itself. For a REF parameter the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information it may ignore it. Although it is intended for user-nameddefined and Ref parameters this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-nameddefined or REF type the given typeName is ignored. @param parameterIndex the first parameter is 1 the second is 2 ... @param sqlType a value from java.sql.Types @param typeName the fully-qualified name of an SQL user-nameddefined type; ignored if the parameter is not a user-nameddefined type or REF @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class PreparedStatement, void setObject(int, Object)

Sets the value of athe designated parameter using anthe given object. The second parameter must be of type Object; usetherefore the java.lang equivalent objects should be used for integralbuilt-in valuestypes.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument java object will be converted to the corresponding SQL type before being sent to the database.

Note that this method may be used to pass datatabase- specific abstract data types by using a Driverdriver-specific Java type. If the object is of a class implementing the interface SQLData the JDBC driver should call itsthe method SQLData.writeSQL to write it to the SQL data stream. If on the other hand the object is of a class implementing Ref Blob Clob Struct or Array then the driver should pass it to the database as a value of the corresponding SQL type. This method throws an exception if there is an ambiguity for example if the object is of a class implementing more than one of thosethe interfaces named above. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the object containing the input parameter value @exception SQLException if a database access error occurs

Class PreparedStatement, void setObject(int, Object, int)

Sets the value of the designated parameter with the given object. This method is like the method setObject above except that it assumes a scale of zero. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the object containing the input parameter value @param targetSqlType the SQL type (as defined in java.sql.Types) to be sent to the database @exception SQLException if a database access error occurs
Class PreparedStatement, void setObject(int, Object, int, int)

Sets the value of athe designated parameter using anwith the given object. The second argument must be an object type; for integral values the java.lang equivalent objects should be used.

The given Java object will be converted to the given targetSqlType before being sent to the database. If the object has a custom mapping (is of a class implementing the interface SQLData) the JDBC driver should call itsthe method SQLData.writeSQL to write it to the SQL data stream. If on the other hand the object is of a class implementing Ref Blob Clob Struct or Array the driver should pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass datatabase- specific abstract data types. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the object containing the input parameter value @param targetSqlType the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type. @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal point. For all other types this value will be ignored. @exception SQLException if a database access error occurs @see Types

Class PreparedStatement, void setRef(int, Ref)

JDBCSets 2.0the Setsdesignated aparameter to the given REF(<structured-type>) parametervalue. @param i the first parameter is 1 the second is 2 ... @param x an object representing data of an SQL REF Typevalue @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setShort(int, short)

Sets the designated parameter to a Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setString(int, String)

Sets the designated parameter to a Java String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHARsVARCHAR values) when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setTime(int, Time)

Sets the designated parameter to a java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setTime(int, Time, Calendar)

JDBC 2.0 Sets the designated parameter to athe given java.sql.Time value using the given Calendar object. The driver uses the Calendar object to construct an SQL TIME value which the driver then sends to the database. With a a Calendar object the driver can calculate the time taking into account a custom timezone and locale. If no Calendar object is specified the driver uses the default timezone andwhich is that of the virtual machine running the localeapplication. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @param cal the Calendar object the driver will use to construct the time @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setTimestamp(int, Timestamp)

Sets the designated parameter to a java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @exception SQLException if a database access error occurs
Class PreparedStatement, void setTimestamp(int, Timestamp, Calendar)

JDBC 2.0 Sets the designated parameter to athe given java.sql.Timestamp value using the given Calendar object. The driver uses the Calendar object to construct an SQL TIMESTAMP value which the driver then sends to the database. With a a Calendar object the driver can calculate the timestamp taking into account a custom timezone and locale. If no Calendar object is specified the driver uses the default timezone andwhich is that of the virtual machine running the localeapplication. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the parameter value @param cal the Calendar object the driver will use to construct the timestamp @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setUnicodeStream(int, InputStream, int)

Sets the designated parameter to the given input stream which will have the specified number of bytes. When a very large UNICODE value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.InputStream object. JDBC will read the dataThe data will be read from the stream as needed until it reaches end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format. The byte format of the Unicode stream must be Java UTF-8 as defined in the Java Virtual Machine Specification.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. @param parameterIndex the first parameter is 1 the second is 2 ... @param x the java input stream which contains the UNICODE parameter value @param length the number of bytes in the stream @exception SQLException if a database access error occurs @deprecated


Class Ref

JDBCThe 2.0mapping Ain the Java programming language of an SQL REF value which is a reference to an SQL structured type value in the database.

SQL REF values are stored in a special table that contains instances of a referenceable SQL structured type and each REF value is a unique identifier for one instance in that table. An SQL REF value may be used in place of the SQL structured type it references; it may be used as either a column value in a table or an attribute value in a structured type.

Because an SQL REF value is a logical pointer to an SQL structured type a Ref object is by default also a logical pointer; thus retrieving an SQL REF value as a Ref object does not materialize the attributes of the structured type on the client.

A Ref object can be saved to persistent storage. A Refand is dereferenced by passing it as a parameter to an SQL statement and executing the statement.

The Ref interface is new in the JDBC 2.0 API. @see Struct

Class Ref, String getBaseTypeName()

GetsRetrieves the fully-qualified SQL name of the SQL structured type name ofthat this theRef referenced itemobject references. @return the fully-qualified SQL structured type name of the referenced item.SQL structured type @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class ResultSet

A ResultSet provides access totable of data representing a table of data.database A ResultSet objectresult set which is usually generated by executing a Statementstatement that queries the database.

A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The 'next' method moves the cursor to the next row and because it returns false when there are no more rows in the ResultSet object it can be used in a while loop to iterate through the result set.

A default ResultSet object is not updatable and has a cursor that moves forward only. Thus it is possible to iterate through it only once and only from the first row to the last row. New methods in the JDBC 2.0 API make it possible to produce ResultSet objects that are scrollable and/or updatable. The following code fragment in which con is a valid Connection object illustrates how to make a result set that is scrollable and insensitive to updates by others and that is updatable. See ResultSet fields for other options.

 Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery("SELECT a b FROM TABLE2"); // rs will be scrollable will not show changes made by others // and will be updatable 
The ResultSet interface provides getXXX methods retrievefor retrieving column values forfrom the current row. YouValues can retrieve valuesbe retrieved using either the index number of the column or the name of the column. In general using the column index will be more efficient. Columns are numbered from 1. For maximum portability ResultSetresult set columns within each row should be read in left-to-right order and each column should be read only once.

For the getXXX methods thea JDBC driver attempts to convert the underlying data to the specified Java type specified in the XXX part of the getXXX method and returns a suitable Java value. See theThe JDBC specification forhas a table showing the allowable mappings from SQL types to Java types with the ResultSet.getXXX methods.

Column names used as input to getXXX methods are case insensitive. When performing a getXXX usingmethod is called with a column name ifand several columns have the same name then the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. For columns that are NOT explicitly named in the query it is best to use column numbers. If column names are used there is no way for the programmer to guarantee that they actually refer to the intended columns.

A set of updateXXX methods were added to this interface in the JDBC 2.0 API (JavaTM 2 SDK Standard Edition version 1.2). The comments regarding parameters to the getXXX methods also apply to parameters to the updateXXX methods.

The updateXXX methods may be used in two ways:

  1. to update a column value in the current row. In a scrollable ResultSet object the cursor can be moved backwards and forwards to an absolute position or to a position relative to the current row. The following code fragment updates the NAME column in the fifth row of the ResultSet object rs and then uses the method updateRow to update the data source table from which rs was derived.
     rs.absolute(5); // moves the cursor to the fifth row of rs rs.updateString("NAME" "AINSWORTH"); // updates the // NAME column of row 5 to be AINSWORTH rs.updateRow(); // updates the row in the data source 
  2. to insert column values into the insert row. An updatable ResultSet object has a special row associated with it that serves as a staging area for building a row to be inserted. The following code fragment moves the cursor to the insert row builds a three-column row and inserts it into rs and into the data source table using the method insertRow.
     rs.moveToInsertRow(); // moves cursor to the insert row rs.updateString(1 "AINSWORTH"); // updates the // first column of the insert row to be AINSWORTH rs.updateInt(2 35); // updates the second column to be 35 rs.updateBoolean(3 true); // updates the third row to true rs.insertRow(); rs.moveToCurrentRow(); 

A ResultSet object is automatically closed bywhen the Statement object that generated it when that Statement is closed re-executed or used to retrieve the next result from a sequence of multiple results.

The number types and properties of a ResultSet object's columns are provided by the ResulSetMetaData object returned by the ResultSet.getMetaData method. @see Statement#executeQuery @see Statement#getResultSet @see ResultSetMetaData

Class ResultSet, boolean absolute(int)

JDBC 2.0 Moves the cursor to the given row number in thethis resultResultSet setobject.

If the row number is positive the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1 the second is row 2 and so on.

If the given row number is negative the cursor moves to an absolute row position with respect to the end of the result set. For example calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) indicatesmoves the cursor to the next-to-last row and so on.

An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before/after the first/last row respectivelyor after the last row.

Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last(). @return true if the cursor is on the result set; false otherwise @exception SQLException if a database access error occurs orthe row is 0 or the result set type is TYPE_FORWARD_ONLY @since 1.2 @see What Is in the JDBC 2.0 API

Class ResultSet, void afterLast()

JDBC 2.0 Moves the cursor to the end of thethis resultResultSet setobject just after the last row. HasThis method has no effect if the result set contains no rows. @exception SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void beforeFirst()

JDBC 2.0 Moves the cursor to the front of thethis resultResultSet setobject just before the first row. HasThis method has no effect if the result set contains no rows. @exception SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void cancelRowUpdates()

JDBC 2.0 Cancels the updates made to athe current row in this ResultSet object. This method may be called after calling an updateXXX method(s) and before calling the method updateRow to rollbackroll back the updates made to a row. If no updates have been made or updateRow has already been called then this method has no effect. @exception SQLException if a database access error occurs or if this method is called when the cursor is on the insert row @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void clearWarnings()

Clears all warnings reported on this ResultSet object. After this callmethod is called the method getWarnings returns null until a new warning is reported for this ResultSet object. @exception SQLException if a database access error occurs
Class ResultSet, void close()

Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed re-executed or is used to retrieve the next result from a sequence of multiple results. A ResultSet object is also automatically closed when it is garbage collected. @exception SQLException if a database access error occurs

Class ResultSet, void deleteRow()

JDBC 2.0 Deletes the current row from thethis resultResultSet setobject and from the underlying database. CannotThis method cannot be called when the cursor is on the insert row. @exception SQLException if a database access error occurs or if this method is called when the cursor is on the insert row @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int findColumn(String)

Maps the given ResultsetResultSet column name to its ResultSet column index. @param columnName the name of the column @return the column index of the given column name @exception SQLException if a database access error occurs
Class ResultSet, boolean first()

JDBC 2.0 Moves the cursor to the first row in thethis resultResultSet setobject. @return true if the cursor is on a valid row; false if there are no rows in the result set @exception SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Array getArray(String)

JDBCReturns 2.0the Gets an SQL ARRAY valuevalue of the designated column in the current row of this ResultSet object as an Array object in the Java programming language. @param colName the name of the column from which to retrieve the value @return an Array object representing the SQL ARRAY value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Array getArray(int)

JDBCReturns 2.0the Gets an SQL ARRAY value fromvalue of the designated column in the current row of this ResultSet object as an Array object in the Java programming language. @param i the first column is 1 the second is 2 ... @return an Array object representing the SQL ARRAY value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, InputStream getAsciiStream(String)

Gets the value of athe designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getgetXXX method implicitly closes the stream. Also a stream may return 0 when the method available is called whether there is data available or not. @param columnName the SQL name of the column @return a Java input stream that delivers the database column value as a stream of one -byte ASCII characters. If the value is SQL NULL then the resultvalue returned is null. @exception SQLException if a database access error occurs

Class ResultSet, InputStream getAsciiStream(int)

Gets the value of athe designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getgetXXX method implicitly closes the stream. Also a stream may return 0 when the method InputStream.available is called whether there is data available or not. @param columnIndex the first column is 1 the second is 2 ... @return a Java input stream that delivers the database column value as a stream of one -byte ASCII characters.; Ifif the value is SQL NULL then the resultvalue returned is null. @exception SQLException if a database access error occurs

Class ResultSet, BigDecimal getBigDecimal(String)

JDBC 2.0 Gets the value of athe designated column in the current row of this ResultSet object as a java.math.BigDecimal object with full precision. @param columnName the column name @return the column value (full precision); if the value is SQL NULL the resultvalue returned is null in the Java programming language. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, BigDecimal getBigDecimal(String, int)

Gets the value of athe designated column in the current row of this ResultSet object as a java.math.BigDecimal objectin the Java programming language. @param columnName the SQL name of the column @param scale the number of digits to the right of the decimal point @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs @deprecated
Class ResultSet, BigDecimal getBigDecimal(int)

JDBC 2.0 Gets the value of athe designated column in the current row of this ResultSet object as a java.math.BigDecimal object with full precision. @param columnIndex the first column is 1 the second is 2 ... @return the column value (full precision); if the value is SQL NULL the resultvalue returned is null in the Java programming language. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, BigDecimal getBigDecimal(int, int)

Gets the value of athe designated column in the current row of this ResultSet object as a java.mathsql.BigDecimal objectin the Java programming language. @param columnIndex the first column is 1 the second is 2 ... @param scale the number of digits to the right of the decimal point @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs @deprecated
Class ResultSet, InputStream getBinaryStream(String)

Gets the value of athe designated column in the current row of this ResultSet object as a stream of uninterpreted bytesbytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values. The JDBC driver will do any necessary conversion from the database format into uninterpreted bytes.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getgetXXX method implicitly closes the stream. Also a stream may return 0 when the method available is called whether there is data available or not. @param columnName the SQL name of the column @return a Java input stream that delivers the database column value as a stream of uninterpreted bytes. If; if the value is SQL NULL then the result is null. @exception SQLException if a database access error occurs

Class ResultSet, InputStream getBinaryStream(int)

Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getgetXXX method implicitly closes the stream. Also a stream may return 0 when the method InputStream.available is called whether there is data available or not. @param columnIndex the first column is 1 the second is 2 ... @return a Java input stream that delivers the database column value as a stream of uninterpreted bytes. If; if the value is SQL NULL then the resultvalue returned is null. @exception SQLException if a database access error occurs

Class ResultSet, Blob getBlob(String)

JDBCReturns 2.0the Gets a BLOBvalue of the valuedesignated column in the current row of this ResultSet object as a Blob object in the Java programming language. @param colName the name of the column from which to retrieve the value @return a Blob object representing the SQL BLOB value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Blob getBlob(int)

JDBCReturns 2.0the Gets a BLOBvalue of the valuedesignated column in the current row of this ResultSet object as a Blob object in the Java programming language. @param i the first column is 1 the second is 2 ... @return a Blob object representing the SQL BLOB value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean getBoolean(String)

Gets the value of athe designated column in the current row of this ResultSet object as a boolean in the Java booleanprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is false @exception SQLException if a database access error occurs
Class ResultSet, boolean getBoolean(int)

Gets the value of athe designated column in the current row of this ResultSet object as a boolean in the Java booleanprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is false @exception SQLException if a database access error occurs
Class ResultSet, byte getByte(String)

Gets the value of athe designated column in the current row of this ResultSet object as a byte in the Java byteprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, byte getByte(int)

Gets the value of athe designated column in the current row of this ResultSet object as a byte in the Java byteprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, byte[] getBytes(String)

Gets the value of athe designated column in the current row of this ResultSet object as a Java byte array in the Java programming language. The bytes represent the raw values returned by the driver. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, byte[] getBytes(int)

Gets the value of athe designated column in the current row of this ResultSet object as a Java byte array in the Java programming language. The bytes represent the raw values returned by the driver. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Reader getCharacterStream(String)

JDBC 2.0 Gets the value of athe designated column in the current row of this ResultSet object as a java.io.Reader object. @return a java.io.Reader object that contains the column value; if the value is SQL NULL the value returned is null in the Java programming language. @param columnName the name of the column @return the value in the specified column as a java.io.Reader @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Reader getCharacterStream(int)

JDBC 2.0 Gets the value of athe designated column in the current row of this ResultSet object as a java.io.Reader object. @return a java.io.Reader object that contains the column value; if the value is SQL NULL the value returned is null in the Java programming language. @param columnIndex the first column is 1 the second is 2 ... @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Clob getClob(String)

JDBCReturns 2.0the Gets a CLOBvalue of the valuedesignated column in the current row of this ResultSet object as a Clob object in the Java programming language. @param colName the name of the column from which to retrieve the value @return a Clob object representing the SQL CLOB value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Clob getClob(int)

JDBCReturns 2.0the Gets a CLOBvalue of the valuedesignated column in the current row of this ResultSet object as a Clob object in the Java programming language. @param i the first column is 1 the second is 2 ... @return a Clob object representing the SQL CLOB value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int getConcurrency()

JDBC 2.0 Returns the concurrency mode of this resultResultSet setobject. The concurrency used is determined by the statementStatement object that created the result set. @return the concurrency type either CONCUR_READ_ONLY or CONCUR_UPDATABLE @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, String getCursorName()

Gets the name of the SQL cursor used by this ResultSet object.

In SQL a result table is retrieved through a cursor that is named. The current row of a result set can be updated or deleted using a positioned update/delete statement that references the cursor name. To insure that the cursor has the proper isolation level to support update the cursor's select statement should be of the form 'select for update'. If the 'for update' clause is omitted the positioned updates may fail.

The JDBC API supports this SQL feature by providing the name of the SQL cursor used by a ResultSet object. The current row of a ResultSet object is also the current row of this SQL cursor.

Note: If positioned update is not supported a SQLException is thrown. @return the SQL name for this ResultSet object's SQL cursor name @exception SQLException if a database access error occurs

Class ResultSet, Date getDate(String)

Gets the value of athe designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Date getDate(String, Calendar)

GetsReturns the value of athe designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the Datedate if the underlying database does not store timezone information. @param columnName the SQL name of the column from which to retrieve the value @param cal the calendarjava.util.Calendar object to use in constructing the date @return the column value as a java.sql.Date object; if the value is SQL NULL the resultvalue returned is null in the Java programming language @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Date getDate(int)

Gets the value of athe designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Date getDate(int, Calendar)

JDBC 2.0Returns Gets the value of athe designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the Datedate if the underlying database does not store timezone information. @param columnIndex the first column is 1 the second is 2 ... @param cal the calendarjava.util.Calendar object to use in constructing the date @return the column value as a java.sql.Date object; if the value is SQL NULL the resultvalue returned is null in the Java programming language @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, double getDouble(String)

Gets the value of athe designated column in the current row of this ResultSet object as a double in the Java doubleprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, double getDouble(int)

Gets the value of athe designated column in the current row of this ResultSet object as a double in the Java doubleprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, int getFetchDirection()

JDBC 2.0 Returns the fetch direction for this resultResultSet setobject. @return the current fetch direction for this resultResultSet setobject @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int getFetchSize()

JDBC 2.0 Returns the fetch size for this resultResultSet setobject. @return the current fetch size for this resultResultSet setobject @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, float getFloat(String)

Gets the value of athe designated column in the current row of this ResultSet object as a float in the Java floatprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, float getFloat(int)

Gets the value of athe designated column in the current row of this ResultSet object as a float in the Java floatprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, int getInt(String)

Gets the value of athe designated column in the current row of this ResultSet object as aan int in the Java intprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, int getInt(int)

Gets the value of athe designated column in the current row of this ResultSet object as aan int in the Java intprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, long getLong(String)

Gets the value of athe designated column in the current row of this ResultSet object as a long in the Java longprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, long getLong(int)

Gets the value of athe designated column in the current row of this ResultSet object as a long in the Java longprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, ResultSetMetaData getMetaData()

Retrieves the number types and properties of athis ResultSet object's columns. @return the description of athis ResultSet object's columns @exception SQLException if a database access error occurs
Class ResultSet, Object getObject(String)

Gets the value of athe designated column in the current row of this ResultSet object as aan Object in the Java objectprogramming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type following the mapping for built-in types specified in the JDBC specspecification.

This method may also be used to read datatabase-specific abstract data types. JDBC 2.0 In the JDBC 2.0 API the behavior of the method getObject is extended to materialize data of SQL user-defined types. When the a column contains a structured or distinct value the behavior of this method is as if it were a call to: getObject(columnIndex this.getStatement().getConnection().getTypeMap()). @param columnName the SQL name of the column @return a java.lang.Object holding the column value. @exception SQLException if a database access error occurs

Class ResultSet, Object getObject(String, Map)

JDBC 2.0 Returns the value inof the specifieddesignated column in the current row of this ResultSet object as aan Object in the Java objectprogramming language. This method uses the specified Map object for custom mapping if appropriate. @param colName the name of the column from which to retrieve the value @param map a java.util.Map object that contains the mapping from SQL type names to classes in the Java classesprogramming language @return an objectObject representing the SQL value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Object getObject(int)

Gets the value of athe designated column in the current row of this ResultSet object as aan Object in the Java objectprogramming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type following the mapping for built-in types specified in the JDBC specspecification.

This method may also be used to read datatabase-specific abstract data types. JDBC 2.0 In the JDBC 2.0 API the behavior of method getObject is extended to materialize data of SQL user-defined types. When the a column contains a structured or distinct value the behavior of this method is as if it were a call to: getObject(columnIndex this.getStatement().getConnection().getTypeMap()). @param columnIndex the first column is 1 the second is 2 ... @return a java.lang.Object holding the column value @exception SQLException if a database access error occurs

Class ResultSet, Object getObject(int, Map)

JDBC 2.0 Returns the value of athe designated column in the current row of this ResultSet object as aan Object in the Java objectprogramming language. This method uses the given Map object for the custom mapping of the SQL structured or distinct type that is being retrieved. @param i the first column is 1 the second is 2 ... @param map a java.util.Map object that contains the mapping from SQL type names to classes in the Java classesprogramming language @return an objectObject in the Java programming language representing the SQL value @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Ref getRef(String)

JDBCReturns 2.0the Gets avalue of REF(<structured-type>)the column value fromdesignated column in the current row of this ResultSet object as a Ref object in the Java programming language. @param colName the column name @return a Ref object representing the SQL REF value in the specified column @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Ref getRef(int)

JDBCReturns 2.0the Gets avalue of REF(<structured-type>)the column value fromdesignated column in the current row of this ResultSet object as a Ref object in the Java programming language. @param i the first column is 1 the second is 2 ... @return a Ref object representing an SQL REF value @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int getRow()

JDBC 2.0 Retrieves the current row number. The first row is number 1 the second number 2 and so on. @return the current row number; 0 if there is no current row @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, short getShort(String)

Gets the value of athe designated column in the current row of this ResultSet object as a short in the Java shortprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, short getShort(int)

Gets the value of athe designated column in the current row of this ResultSet object as a short in the Java shortprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, Statement getStatement()

JDBC 2.0 Returns the Statement object that produced this ResultSet object. If the result set was generated some other way such as by a DatabaseMetaData method this method returns null. @return the Statment object that produced thethis resultResultSet setobject or null if the result set was produced some other way @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, String getString(String)

Gets the value of athe designated column in the current row of this ResultSet object as a String in the Java Stringprogramming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, String getString(int)

Gets the value of athe designated column in the current row of this ResultSet object as a String in the Java Stringprogramming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Time getTime(String)

Gets the value of athe designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Time getTime(String, Calendar)

GetsReturns the value of athe designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the Timetime if the underlying database does not store timezone information. @param columnName the SQL name of the column @param cal the java.util.Calendar object to use in constructing the time @param cal the calendar to use in constructing the time @return the column value as a java.sql.Time object; if the value is SQL NULL the resultvalue returned is null in the Java programming language @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Time getTime(int)

Gets the value of athe designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Time getTime(int, Calendar)

GetsReturns the value of athe designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the Timetime if the underlying database does not store timezone information. @param columnIndex the first column is 1 the second is 2 ... @param cal the calendarjava.util.Calendar object to use in constructing the time @return the column value as a java.sql.Time object; if the value is SQL NULL the resultvalue returned is null in the Java programming language @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Timestamp getTimestamp(String)

Gets the value of athe designated column in the current row of this ResultSet object as a java.sql.Timestamp object. @param columnName the SQL name of the column @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Timestamp getTimestamp(String, Calendar)

GetsReturns the value of athe designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the Timestamptimestamp if the underlying database does not store timezone information. @param columnName the SQL name of the column @param cal the calendarjava.util.Calendar object to use in constructing the timestampdate @return the column value as a java.sql.Timestamp object; if the value is SQL NULL the resultvalue returned is null in the Java programming language @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Timestamp getTimestamp(int)

Gets the value of athe designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. @param columnIndex the first column is 1 the second is 2 ... @return the column value; if the value is SQL NULL the resultvalue returned is null @exception SQLException if a database access error occurs
Class ResultSet, Timestamp getTimestamp(int, Calendar)

GetsReturns the value of athe designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the Timestamptimestamp if the underlying database does not store timezone information. @param columnIndex the first column is 1 the second is 2 ... @param cal the calendarjava.util.Calendar object to use in constructing the timestamp @return the column value as a java.sql.Timestamp object; if the value is SQL NULL the resultvalue returned is null in the Java programming language @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int getType()

JDBC 2.0 Returns the type of this resultResultSet setobject. The type is determined by the statementStatement object that created the result set. @return TYPE_FORWARD_ONLY TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, InputStream getUnicodeStream(String)

Gets the value of athe designated column in the current row of this ResultSet object as a stream of Unicode characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into Unicode. The byte format of the Unicode stream must be Java UTF-8 as defined in the Java Virtual Machine Specificationvirtual machine specification.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getgetXXX method implicitly closes the stream. Also a stream may return 0 when the method available is called whether there is data available or not. @param columnName the SQL name of the column @return a Java input stream that delivers the database column value as a stream of two-byte Unicode characters. If the value is SQL NULL then the resultvalue returned is null. @exception SQLException if a database access error occurs @deprecated

Class ResultSet, InputStream getUnicodeStream(int)

Gets the value of a column in the current row as a stream of Gets the value of the designated column in the current row of this ResultSet object as as a stream of Unicode characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into Unicode. The byte format of the Unicode stream must be Java UTF-8 as specified in the Java Virtual Machine Specificationvirtual machine specification.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getgetXXX method implicitly closes the stream. Also a stream may return 0 when the method InputStream.available is called whether there is data available or not. @param columnIndex the first column is 1 the second is 2 ... @return a Java input stream that delivers the database column value as a stream ofin Java twoUTF-byte8 Unicodebyte characters.format; Ifif the value is SQL NULL then the resultvalue returned is null. @exception SQLException if a database access error occurs @deprecated use getCharacterStream in place of getUnicodeStream

Class ResultSet, SQLWarning getWarnings()

TheReturns the first warning reported by calls on this ResultSet is returnedobject. Subsequent warnings on this ResultSet warningsobject will be chained to thisthe SQLWarning object that this method returns.

The warning chain is automatically cleared each time a new row is read.

Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by statementStatement methods (such as reading OUT parameters) will be chained on the Statement object. @return the first SQLWarning object reported or null @exception SQLException if a database access error occurs

Class ResultSet, void insertRow()

JDBC 2.0 Inserts the contents of the insert row into thethis resultResultSet setobjaect and into the database. MustThe cursor must be on the insert row when this method is called. @exception SQLException if a database access error occurs if this method is called when the cursor is not on the insert row or if not all of non-nullable columns in the insert row have been given a value @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean isAfterLast()

JDBC 2.0 Indicates whether the cursor is after the last row in thethis resultResultSet setobject. @return true if the cursor is after the last row; false otherwise.if Returnsthe falsecursor is whenat any other position or the result set contains no rows. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean isBeforeFirst()

JDBC 2.0 Indicates whether the cursor is before the first row in thethis resultResultSet setobject. @return true if the cursor is before the first row; false otherwise.if Returnsthe falsecursor is whenat any other position or the result set contains no rows. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean isFirst()

JDBC 2.0 Indicates whether the cursor is on the first row of thethis resultResultSet setobject. @return true if the cursor is on the first row; false otherwise. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean isLast()

JDBC 2.0 Indicates whether the cursor is on the last row of thethis resultResultSet setobject. Note: Calling the method isLast may be expensive because the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set. @return true if the cursor is on the last row; false otherwise. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean last()

JDBC 2.0 Moves the cursor to the last row in thethis resultResultSet setobject. @return true if the cursor is on a valid row; false if there are no rows in the result set @exception SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void moveToCurrentRow()

JDBC 2.0 Moves the cursor to the remembered cursor position usually the current row. This method has no effect if the cursor is not on the insert row. @exception SQLException if a database access error occurs or the result set is not updatable @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void moveToInsertRow()

JDBC 2.0 Moves the cursor to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the updateXXX methods prior to inserting the row into the result set. Only the updateXXX getXXX and insertRow methods may be called when the cursor is on the insert row. All of the columns in a result set must be given a value each time this method is called before calling insertRow. The methodAn updateXXX method must be called before a getXXX method can be called on a column value. @exception SQLException if a database access error occurs or the result set is not updatable @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean next()

Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row and so on.

If an input stream is open for the current row a call to the method next will implicitly close it. TheA ResultSet object's warning chain is cleared when a new row is read. @return true if the new current row is valid; false if there are no more rows @exception SQLException if a database access error occurs

Class ResultSet, boolean previous()

JDBC 2.0 Moves the cursor to the previous row in thethis resultResultSet setobject.

Note: Calling the method previous() is not the same as calling the method relative(-1) because it makes sense to callprevious() when there is no current row. @return true if the cursor is on a valid row; false if it is off the result set @exception SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY @since 1.2 @see What Is in the JDBC 2.0 API

Class ResultSet, void refreshRow()

JDBC 2.0 Refreshes the current row with its most recent value in the database. CannotThis method cannot be called when the cursor is on the insert row.

The refreshRow method provides a way for an application to explicitly tell the JDBC driver to refetch a row(s) from the database. An application may want to call refreshRow when caching or prefetching is being done by the JDBC driver to fetch the latest value of a row from the database. The JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one.

All values are refetched subject to the transaction isolation level and cursor sensitivity. If refreshRow is called after calling an updateXXX method but before calling the method updateRow then the updates made to the row are lost. Calling the method refreshRow frequently will likely slow performance. @exception SQLException if a database access error occurs or if this method is called when the cursor is on the insert row @since 1.2 @see What Is in the JDBC 2.0 API

Class ResultSet, boolean relative(int)

JDBC 2.0 Moves the cursor a relative number of rows either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid but does not change the cursor position.

Note: Calling the method relative(1) is different from calling the method next() because is makes sense to call next() when there is no current row for example when the cursor is positioned before the first row or after the last row of the result set. @return true if the cursor is on a row; false otherwise @exception SQLException if a database access error occurs there is no current row or the result set type is TYPE_FORWARD_ONLY @since 1.2 @see What Is in the JDBC 2.0 API

Class ResultSet, boolean rowDeleted()

JDBC 2.0 Indicates whether a row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not thethis resultResultSet setobject can detect deletions. @return true if a row was deleted and deletions are detected; false otherwise @exception SQLException if a database access error occurs @see DatabaseMetaData#deletesAreDetected @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean rowInserted()

JDBC 2.0 Indicates whether the current row has had an insertion. The value returned depends on whether or not thethis resultResultSet setobject can detect visible inserts. @return true if a row has had an insertion and insertions are detected; false otherwise @exception SQLException if a database access error occurs @see DatabaseMetaData#insertsAreDetected @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean rowUpdated()

JDBC 2.0 Indicates whether the current row has been updated. The value returned depends on whether or not the result set can detect updates. @return true if the row has been visibly updated by the owner or another and updates are detected @exception SQLException if a database access error occurs @see DatabaseMetaData#updatesAreDetected @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void setFetchDirection(int)

JDBC 2.0 Gives a hint as to the direction in which the rows in this resultResultSet setobject will be processed. The initial value is determined by the statementStatement object that produced thethis resultResultSet setobject. The fetch direction may be changed at any time. @exception SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY and the fetch direction is not FETCH_FORWARD @since 1.2 @see What Is in the JDBC 2.0 API @see Statement#setFetchDirection
Class ResultSet, void setFetchSize(int)

JDBC 2.0 Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this resultResultSet setobject. If the fetch size specified is zero the JDBC driver ignores the value and is free to make its own best guess as to what the fetch size should be. The default value is set by the statementStatement object that created the result set. The fetch size may be changed at any time. @param rows the number of rows to fetch @exception SQLException if a database access error occurs or the condition 0 < rows < this.getMaxRows() is not satisfied @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateAsciiStream(String, InputStream, int)

JDBC 2.0 Updates athe designated column with an ascii stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @param length the length of the stream @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateAsciiStream(int, InputStream, int)

JDBC 2.0 Updates athe designated column with an ascii stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @param length the length of the stream @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBigDecimal(String, BigDecimal)

JDBC 2.0 Updates athe designated column with a java.sql.BigDecimal value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBigDecimal(int, BigDecimal)

JDBC 2.0 Updates athe designated column with a java.math.BigDecimal value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBinaryStream(String, InputStream, int)

JDBC 2.0 Updates athe designated column with a binary stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @param length the length of the stream @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBinaryStream(int, InputStream, int)

JDBC 2.0 Updates athe designated column with a binary stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @param length the length of the stream @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBoolean(String, boolean)

JDBC 2.0 Updates athe designated column with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBoolean(int, boolean)

JDBC 2.0 Updates athe designated column with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateByte(String, byte)

JDBC 2.0 Updates athe designated column with a byte value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateByte(int, byte)

JDBC 2.0 Updates athe designated column with a byte value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBytes(String, byte[])

Updates the designated column with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. JDBC 2.0 Updates a column with a byte array value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateBytes(int, byte[])

JDBC 2.0 Updates athe designated column with a byte array value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateCharacterStream(String, Reader, int)

JDBC 2.0 Updates athe designated column with a character stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @param length the length of the stream @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateCharacterStream(int, Reader, int)

JDBC 2.0 Updates athe designated column with a character stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @param length the length of the stream @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateDate(String, Date)

JDBC 2.0 Updates athe designated column with a java.sql.Date value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateDate(int, Date)

JDBC 2.0 Updates athe designated column with a java.sql.Date value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateDouble(String, double)

JDBC 2.0 Updates athe designated column with a double value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateDouble(int, double)

JDBC 2.0 Updates athe designated column with a Doubledouble value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateFloat(String, float)

JDBC 2.0 Updates athe designated column with a float value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateFloat(int, float)

JDBC 2.0 Updates athe designated column with a float value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateInt(String, int)

JDBC 2.0 Updates athe designated column with an integerint value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateInt(int, int)

JDBC 2.0 Updates athe designated column with an integerint value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateLong(String, long)

JDBC 2.0 Updates athe designated column with a long value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateLong(int, long)

JDBC 2.0 Updates athe designated column with a long value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateNull(String)

JDBC 2.0 Updates athe designated column with a null value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateNull(int)

JDBC 2.0 GiveGives a nullable column a null value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateObject(String, Object)

JDBC 2.0 Updates athe designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateObject(String, Object, int)

JDBC 2.0 Updates athe designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @param scale Forfor java.sql.Types.DECIMALDECIMA or java.sql.Types.NUMERIC types this is the number of digits after the decimal point. For all other types this value will be ignored. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateObject(int, Object)

JDBC 2.0 Updates athe designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateObject(int, Object, int)

JDBC 2.0 Updates athe designated column with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @param scale Forfor java.sql.Types.DECIMALDECIMA or java.sql.Types.NUMERIC types this is the number of digits after the decimal point. For all other types this value will be ignored. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateRow()

JDBC 2.0 Updates the underlying database with the new contents of the current row of this ResultSet object. CannotThis method cannot be called when the cursor is on the insert row. @exception SQLException if a database access error occurs or if this method is called when the cursor is on the insert row @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateShort(String, short)

JDBC 2.0 Updates athe designated column with a short value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateShort(int, short)

JDBC 2.0 Updates athe designated column with a short value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateString(String, String)

JDBC 2.0 Updates athe designated column with a String value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateString(int, String)

JDBC 2.0 Updates athe designated column with a String value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateTime(String, Time)

JDBC 2.0 Updates athe designated column with a java.sql.Time value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateTime(int, Time)

JDBC 2.0 Updates athe designated column with a java.sql.Time value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateTimestamp(String, Timestamp)

JDBC 2.0 Updates athe designated column with a java.sql.Timestamp value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName the name of the column @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, void updateTimestamp(int, Timestamp)

JDBC 2.0 Updates athe designated column with a java.sql.Timestamp value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnIndex the first column is 1 the second is 2 ... @param x the new column value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, boolean wasNull()

Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getXXX methods on a column to try to read its value and then call the method wasNull() to see if the value read was SQL NULL. @return true if the last column value read was SQL NULL and false otherwise @exception SQLException if a database access error occurs
Class ResultSet, int CONCUR_READ_ONLY

JDBCThe 2.0constant Theindicating the concurrency mode for a ResultSet object that may NOT be updated. @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int CONCUR_UPDATABLE

JDBCThe 2.0constant Theindicating the concurrency mode for a ResultSet object that may be updated. @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int FETCH_FORWARD

JDBCThe 2.0constant Theindicating that the rows in a result set will be processed in a forward direction; first-to-last. This constant is used by the method setFetchDirection as a hint to the driver which the driver may ignore. @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int FETCH_REVERSE

JDBCThe 2.0constant Theindicating that the rows in a result set will be processed in a reverse direction; last-to-first. This constant is used by the method setFetchDirection as a hint to the driver which the driver may ignore. @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int FETCH_UNKNOWN

JDBCThe 2.0constant Theindicating that the order in which rows in a result set will be processed is unknown. This constant is used by the method setFetchDirection as a hint to the driver which the driver may ignore.
Class ResultSet, int TYPE_FORWARD_ONLY

JDBCThe 2.0constant Theindicating the type for a ResultSet object whose cursor may move only forward. @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int TYPE_SCROLL_INSENSITIVE

JDBCThe 2.0constant Theindicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others. @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, int TYPE_SCROLL_SENSITIVE

JDBCThe 2.0constant Theindicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others. @since 1.2 @see What Is in the JDBC 2.0 API

Class ResultSetMetaData

An object that can be used to find outget information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs creates the ResultSetMetaData object rsmd and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.
 ResultSet rs = stmt.executeQuery("SELECT a b c FROM TABLE2"); ResultSetMetaData rsmd = rs.getMetaData(); int numberOfColumns = rsmd.getColumnCount(); boolean b = rsmd.isSearchable(1); 
Class ResultSetMetaData, String getCatalogName(int)

Gets athe designated column's table's catalog name. @param column the first column is 1 the second is 2 ... @return column name or "" if not applicable. @exception SQLException if a database access error occurs
Class ResultSetMetaData, String getColumnClassName(int)

JDBC 2.0

Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. ResultSet.getObject may return a subclass of the class returned by this method. @return the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping. @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class ResultSetMetaData, int getColumnCount()

Returns the number of columns in this ResultSet object. @return the number of columns @exception SQLException if a database access error occurs
Class ResultSetMetaData, int getColumnDisplaySize(int)

Indicates the designated column's normal maxmaximum width in charscharacters. @param column the first column is 1 the second is 2 ... @return the normal maximum number of characters allowed as the width of the designated column @exception SQLException if a database access error occurs
Class ResultSetMetaData, String getColumnLabel(int)

Gets the suggesteddesignated column's suggested title for use in printouts and displays. @param column the first column is 1 the second is 2 ... @return the suggested column title @exception SQLException if a database access error occurs
Class ResultSetMetaData, String getColumnName(int)

GetsGet athe designated column's name. @param column the first column is 1 the second is 2 ... @return column name @exception SQLException if a database access error occurs
Class ResultSetMetaData, int getColumnType(int)

Retrieves athe designated column's SQL type. @param column the first column is 1 the second is 2 ... @return SQL type from java.sql.Types @exception SQLException if a database access error occurs @see Types
Class ResultSetMetaData, String getColumnTypeName(int)

Retrieves athe designated column's database-specific type name. @param column the first column is 1 the second is 2 ... @return type name used by the database. If the column type is a user-defined type then a fully-qualified type name is returned. @exception SQLException if a database access error occurs
Class ResultSetMetaData, int getPrecision(int)

GetsGet athe designated column's number of decimal digits. @param column the first column is 1 the second is 2 ... @return precision @exception SQLException if a database access error occurs
Class ResultSetMetaData, int getScale(int)

Gets athe designated column's number of digits to right of the decimal point. @param column the first column is 1 the second is 2 ... @return scale @exception SQLException if a database access error occurs
Class ResultSetMetaData, String getSchemaName(int)

GetsGet athe designated column's table's schema. @param column the first column is 1 the second is 2 ... @return schema name or "" if not applicable @exception SQLException if a database access error occurs
Class ResultSetMetaData, String getTableName(int)

Gets athe designated column's table name. @param column the first column is 1 the second is 2 ... @return table name or "" if not applicable @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isAutoIncrement(int)

Indicates whether the designated column is automatically numbered thus read-only. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isCaseSensitive(int)

Indicates whether a column's case matters. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isCurrency(int)

Indicates whether the designated column is a cash value. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isDefinitelyWritable(int)

Indicates whether a write on the designated column will definitely succeed. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, int isNullable(int)

Indicates the nullability of values in the designated column. @param column the first column is 1 the second is 2 ... @return the nullability status of the given column; one of columnNoNulls columnNullable or columnNullableUnknown @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isReadOnly(int)

Indicates whether athe designated column is definitely not writable. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isSearchable(int)

Indicates whether the designated column can be used in a where clause. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isSigned(int)

Indicates whether values in the designated column are signed numbers. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, boolean isWritable(int)

Indicates whether it is possible for a write on the designated column to succeed. @param column the first column is 1 the second is 2 ... @return true if so; false otherwise @exception SQLException if a database access error occurs
Class ResultSetMetaData, int columnNoNulls

ColumnThe constant indicating that a column does not allow NULL values.
Class ResultSetMetaData, int columnNullable

ColumnThe constant indicating that a column allows NULL values.
Class ResultSetMetaData, int columnNullableUnknown

NullabilityThe constant indicating that the nullability of a column's values is unknown.

Class SQLData

JDBC 2.0 The interface used for the custom mapping of SQL user-defined types. This interface must be implemented by aany Java class that is registered in a type mapping. It is expected that this interface will normally be implemented by a tool. The methods in this interface are called by the driver and are never called by a programmer directly. @since 1.2 @see What Is in the JDBC 2.0 API
Class SQLData, String getSQLTypeName()

Returns the fully-qualified name of the SQL user-defined type that this object represents. This method is called by the JDBC driver to get the name of the UDT instance that is being mapped to this instance of SQLData. @returnsreturn the type name that was passed to the method readSql when this object was constructed and populated @exception SQLException if there is a database access error @since 1.2 @see What Is in the JDBC 2.0 API
Class SQLData, void readSQL(SQLInput, String)

Populates this object with data read from the database. The implementation of the method must follow this protocol: The JDBC driver initializes the input stream with a type map before calling this method which is used by the appropriate SQLInput.readXXX method on the stream. @param stream the inputSQLInput SQLobject from which to read the data streamfor the value that is being custom mapped @param descriptortypeName the SQL type name of the value on the data stream @exception SQLException if there is a database access error @see SQLInput
Class SQLData, void writeSQL(SQLOutput)

Writes this object to the given SQL data stream converting it back to its SQL value in the data source. The implementation of the method must follow this protocol:
It must write each of the attributes of the SQL type to the given output stream. This is done by calling a method of the output stream to write each item in the order that they appear in the SQL definition of the type. Specifically it must call the appropriate SQLOutput.writeXXX method(s) to do the following: for a Distinct Type write its single data element; for a Structured Type write a value for each attribute of the SQL type. @param stream the outputSQLOutput SQLobject to which to write the data streamfor the value that was custom mapped @exception SQLException if there is a database access error @see SQLOutput @since 1.2 @see What Is in the JDBC 2.0 API

Class SQLException

An exception that provides information on a database access error or other errors.

Each SQLException provides several kinds of information:

Class SQLException, constructor SQLException()

Constructs an SQLException object; reason defaults to null SQLState defaults to null and vendorCode defaults to 0.
Class SQLException, constructor SQLException(String)

Constructs an SQLException object with a reason; SQLState defaults to null and vendorCode defaults to 0. @param reason a description of the exception
Class SQLException, SQLException getNextException()

Retrieves the exception chained to this SQLException object. @return the next SQLException object in the chain; null if there are none
Class SQLException, void setNextException(SQLException)

Adds an SQLException object to the end of the chain. @param ex the new exception that will be added to the end of the SQLException chain

Class SQLInput

JDBC 2.0 AAn input stream that contains a stream of values representing an instance of an SQL structured or distinct type. This interface used only for custom mapping is used by the driver behind the scenes and a programmer never directly invokes SQLInput methods. The readXXX methods provide a way to read the values in an SQLInput object. The method wasNull is used to determine whether the the last value read was SQL NULL.

When the method getObject is called with an object of a class implementing the interface SQLData the JDBC driver calls the method SQLData.getSQLType to determine the SQL type of the user-defined type (UDT) being custom mapped. The driver creates an instance of SQLInput populating it with the attributes of the UDT. The driver then passes the input stream to the method SQLData.readSQL which in turn calls the SQLInput.readXXX methods in its implementation for reading the attributes from the input stream. @since 1.2 @see What Is in the JDBC 2.0 API

Class SQLInput, Array readArray()

Reads an arraySQL ARRAY value from the stream and returns it as an Array object in the Java programming language. @return an Array object representing data of the SQL arrayARRAY value at the head of the stream; null if the value read is SQL NULL @exception SQLException if a database access error occurs
Class SQLInput, InputStream readAsciiStream()

Returns the next attribute in the stream as a stream of ASCII characters. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, BigDecimal readBigDecimal()

Reads the next attribute in the stream as a java.math.BigDecimal object in the Java programming language. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, InputStream readBinaryStream()

Returns the next attribute in the stream as a stream of uninterpreted bytes. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, Blob readBlob()

Reads aan SQL BLOB value from the stream and returns it as a Blob object in the Java programming language. @return ana Blob object representing data of the SQL BLOB value at the head of the stream; null if the value read is SQL NULL @exception SQLException if a database access error occurs
Class SQLInput, boolean readBoolean()

Reads the next attribute in the stream as a boolean in the Java booleanprogramming language. @return the attribute; if the value is SQL NULL returnreturns null.false @exception SQLException if a database access error occurs
Class SQLInput, byte readByte()

Reads the next attribute in the stream as a byte in the Java byteprogramming language. @return the attribute; if the value is SQL NULL returnreturns null.0 @exception SQLException if a database access error occurs
Class SQLInput, byte[] readBytes()

Reads the next attribute in the stream as an array of bytes in the Java programming language. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, Reader readCharacterStream()

Returns the next attribute in the stream as a stream of Unicode characters. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, Clob readClob()

Reads aan SQL CLOB value from the stream and returns it as a Clob object in the Java programming language. @return ana Clob object representing data of the SQL CLOB value at the head of the stream; null if the value read is SQL NULL @exception SQLException if a database access error occurs
Class SQLInput, Date readDate()

Reads the next attribute in the stream as a java.sql.Date object. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, double readDouble()

Reads the next attribute in the stream as a double in the Java doubleprogramming language. @return the attribute; if the value is SQL NULL returnreturns null.0 @exception SQLException if a database access error occurs
Class SQLInput, float readFloat()

Reads the next attribute in the stream as a float in the Java floatprogramming language. @return the attribute; if the value is SQL NULL returnreturns null.0 @exception SQLException if a database access error occurs
Class SQLInput, int readInt()

Reads the next attribute in the stream as aan int in the Java intprogramming language. @return the attribute; if the value is SQL NULL returnreturns null.0 @exception SQLException if a database access error occurs
Class SQLInput, long readLong()

Reads the next attribute in the stream as a long in the Java longprogramming language. @return the attribute; if the value is SQL NULL returnreturns null.0 @exception SQLException if a database access error occurs
Class SQLInput, Object readObject()

Returns the datum at the head of the stream as aan Object in the Java objectprogramming language. The actual type of the object returned is determined by the default type mapping and any customizations present in this stream's type map.

A type map is registered with the stream by the JDBC driver before the stream is passed to the application.

When the datum at the head of the stream is an SQL NULL the method returns null. If the datum is an SQL structured or distinct type it determines the SQL type of the datum at the head of the stream. If the stream's type map has an entry for that SQL type the driver constructs an object of the appropriate class and calls the method SQLData.readSQL on that object which reads additional data from the stream using the protocol described for that method. @return the datum at the head of the stream as aan Object in the Java object;programming language;null if the datum is SQL NULL @exception SQLException if a database access error occurs

Class SQLInput, Ref readRef()

Reads aan SQL REF(<structured-type>) value from the stream and returns it as a Ref object in the Java programming language. @return ana Ref object representing data of the SQL REF value at the head of the stream; null if the value read is SQL NULL @exception SQLException if a database access error occurs
Class SQLInput, short readShort()

Reads the next attribute in the stream as a short in the Java shortprogramming language. @return the attribute; if the value is SQL NULL returnreturns null.0 @exception SQLException if a database access error occurs
Class SQLInput, String readString()

Reads the next attribute in the stream as a String in the Java Stringprogramming language. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, Time readTime()

Reads the next attribute in the stream as a java.sql.Time object. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, Timestamp readTimestamp()

Reads the next attribute in the stream as a java.sql.Timestamp object. @return the attribute; if the value is SQL NULL returnreturns null. @exception SQLException if a database access error occurs
Class SQLInput, boolean wasNull()

Determines whether the last value read was nullSQL NULL. @return true if the most recently gottenread SQL value was nullSQL NULL; otherwise false @exception SQLException if a database access error occurs

Class SQLOutput

JDBC 2.0 The output stream for writing the attributes of a user-defined type back to the database. This interface used only for custom mapping is used by the driver and its methods are never directly invoked by a programmer.

When an object of a class implementing the interface SQLData is passed as an argument to an SQL statement the JDBC driver calls the method SQLData.getSQLType to determine the kind of SQL datum being passed to the database. The driver then creates an instance of SQLOutput and passes it to the method SQLData.writeSQL. The method writeSQL in turn calls the appropriate SQLOutput.writeXXX methods to write data from the SQLData object to the SQLOutput output stream as the representation of an SQL user-defined type. @since 1.2 @see What Is in the JDBC 2.0 API

Class SQLOutput, void writeArray(Array)

Writes an arraySQL ARRAY value to the stream. @param x an Array object representing data of an SQL arrayARRAY type @exception SQLException if a database access error occurs
Class SQLOutput, void writeAsciiStream(InputStream)

ReturnsWrites the next attribute to the stream as a stream of ASCII characters. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeBigDecimal(BigDecimal)

Writes the next attribute to the stream as a java.math.BigDecimal object. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeBinaryStream(InputStream)

ReturnsWrites the next attribute to the stream as a stream of uninterpreted bytes. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeBlob(Blob)

Writes aan SQL BLOB value to the stream. @param x ana Blob object representing adata of an SQL BLOB value @exception SQLException if a database access error occurs
Class SQLOutput, void writeBoolean(boolean)

Writes the next attribute to the stream as a Java boolean. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeByte(byte)

Writes the next attribute to the stream as a Java byte. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeBytes(byte[])

Writes the next attribute to the stream as an array of bytes. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeCharacterStream(Reader)

ReturnsWrites the next attribute to the stream as a stream of Unicode characters. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeClob(Clob)

Writes aan SQL CLOB value to the stream. @param x ana Clob object representing adata of an SQL CLOB value @exception SQLException if a database access error occurs
Class SQLOutput, void writeDate(Date)

Writes the next attribute to the stream as a java.sql.Date object. Writes the next attribute to the stream as a java.sql.Date object in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeDouble(double)

Writes the next attribute to the stream as a Java double. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeFloat(float)

Writes the next attribute to the stream as a Java float. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeInt(int)

Writes the next attribute to the stream as a Java int. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeLong(long)

Writes the next attribute to the stream as a Java long. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeObject(SQLData)

Writes to the stream the data contained in the given SQLData object. When the SQLData object is null this method writes an SQL NULL to the stream. Otherwise it calls the SQLData.writeSQL method of the given object which writes the object's attributes to the stream. The implementation of the method SQLData.writeSQ calls the appropriate SQLOutput.writeXXX method(s) for writing each of the object's attributes in order. The attributes must be read from an SQLInput input stream and written to an SQLOutput output stream in the same order in which they were listed in the SQL definition of the user-defined type. @param x the object representing data of an SQL structured or distinct type @exception SQLException if a database access error occurs
Class SQLOutput, void writeRef(Ref)

Writes aan SQL REF(<structured-type>) value to the stream. @param x ana Ref object representing data of an SQL REF Typevalue @exception SQLException if a database access error occurs
Class SQLOutput, void writeShort(short)

Writes the next attribute to the stream as a Java short. Writes the next attribute to the stream as a String in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeString(String)

Writes the next attribute to the stream as a String in the Java Stringprogramming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeStruct(Struct)

Writes aan SQL structured- type value to the stream. @param x ana Struct object representing data of a Structuredan SQL Typestructured type @exception SQLException if a database access error occurs
Class SQLOutput, void writeTime(Time)

Writes the next attribute to the stream as a java.sql.Time object. Writes the next attribute to the stream as a java.sql.Date object in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs
Class SQLOutput, void writeTimestamp(Timestamp)

Writes the next attribute to the stream as a java.sql.Timestamp object. Writes the next attribute to the stream as a java.sql.Date object in the Java programming language. @param x the value to pass to the database. @exception SQLException if a database access error occurs

Class SQLWarning, constructor SQLWarning()

Constructs a default SQLWarning object. The reason defaults to null SQLState defaults to null and vendorCode defaults to 0.
Class SQLWarning, constructor SQLWarning(String)

Constructs an SQLWarning object with the given value for a reason; SQLState defaults to null and vendorCode defaults to 0. @param reason a description of the warning
Class SQLWarning, SQLWarning getNextWarning()

Retrieves the warning chained to this SQLWarning object. @return the next SQLException in the chain; null if none

Class Statement

The object used for executing a static SQL statement and obtaining the results produced by it.

Only one ResultSet object per Statement object can be open at any point in time. Therefore if the reading of one ResultSet object is interleaved with the reading of another each must have been generated by different StatementsStatement objects. All statement execute methods implicitly close a statment's current ResultSet object if an open one exists. @see Connection#createStatement @see ResultSet

Class Statement, void addBatch(String)

JDBC 2.0 Adds aan SQL command to the current batch of commmands for thethis statementStatement object. This method is optional. @param sql typically this is a static SQL INSERT or UPDATE statement @exception SQLException if a database access error occurs or the driver does not support batch statements @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, void clearBatch()

JDBC 2.0 Makes the set of commands in the current batch empty. This method is optional. @exception SQLException if a database access error occurs or the driver does not support batch statements @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, void clearWarnings()

Clears all the warnings reported on this Statement object. After a call to this method the method getWarnings will return null until a new warning is reported for this Statement object. @exception SQLException if a database access error occurs
Class Statement, void close()

Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.

Note: A Statement object is automatically closed when it is garbage collected. When a Statement object is closed its current ResultSet object if one exists is also closed. @exception SQLException if a database access error occurs

Class Statement, boolean execute(String)

Executes aan SQL statement that may return multiple results. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string. The methods execute getMoreResults getResultSet and getUpdateCount let you navigate through multiple results. The execute method executes aan SQL statement and indicates the form of the first result. You can then use the methods getResultSet or getUpdateCount to retrieve the result and getMoreResults to move to any subsequent result(s). @param sql any SQL statement @return true if the next result is a ResultSet object; false if it is an update count or there are no more results @exception SQLException if a database access error occurs @see #getResultSet @see #getUpdateCount @see #getMoreResults
Class Statement, int[] executeBatch()

JDBC 2.0 Submits a batch of commands to the database for execution and if all commands execute successfully returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:
  1. A number greater than or equal to zero -- indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution
  2. A value of -2 -- indicates that the command was processed successfully but that the number of rows affected is unknown

    If one of the commands in a batch update fails to execute properly this method throws a BatchUpdateException and a JDBC driver may or may not continue to process the remaining commands in the batch. However the driver's behavior must be consistent with a particular DBMS either always continuing to process commands or never continuing to process commands. ThisIf the driver continues processing after a failure the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements as there are commands in the batch and at least one of the elements will be the following:

  3. A value of -3 -- indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails

A driver is optionalnot required to implement this method. The possible implementations and return values have been modified in the Java 2 SDK Standard Edition version 1.3 to accommodate the option of continuing to proccess commands in a batch update after a BatchUpdateException obejct has been thrown. @return an array of update counts containing one element for each command in the batch. The elements of the array isare ordered according to the order in which commands were insertedadded intoto the batch. @exception SQLException if a database access error occurs or the driver does not support batch statements. Throws BatchUpdateException (a subclass of SQLException) if one of the commands sent to the database fails to execute properly or attempts to return a result set. @since 1.3 @see What Is in the JDBC 2.0 API

Class Statement, ResultSet executeQuery(String)

Executes aan SQL statement that returns a single ResultSet object. @param sql typically this is a static SQL SELECT statement @return a ResultSet object that contains the data produced by the given query; never null @exception SQLException if a database access error occurs
Class Statement, int executeUpdate(String)

Executes an SQL INSERT UPDATE or DELETE statement. In addition SQL statements that return nothing such as SQL DDL statements can be executed. @param sql aan SQL INSERT UPDATE or DELETE statement or aan SQL statement that returns nothing @return either the row count for INSERT UPDATE or DELETE statements or 0 for SQL statements that return nothing @exception SQLException if a database access error occurs
Class Statement, Connection getConnection()

JDBC 2.0 Returns the Connection object that produced this Statement object. @return the connection that produced this statement @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, int getFetchDirection()

JDBC 2.0 Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object. If this Statement object has not set a fetch direction by calling the method setFetchDirection the return value is implementation-specific. @return the default fetch direction for result sets generated from this Statement object @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, int getFetchSize()

JDBC 2.0 Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object. If this Statement object has not set a fetch size by calling the method setFetchSize the return value is implementation-specific. @return the default fetch size for result sets generated from this Statement object @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, int getMaxFieldSize()

Returns the maximum number of bytes allowed for any column value. This limit is the maximum number of bytes that can be returned for any column value. The limit applies only to BINARY VARBINARY LONGVARBINARY CHAR VARCHAR and LONGVARCHAR columns. If the limit is exceeded the excess data is silently discarded. @return the current max column size limit; zero means unlimited @exception SQLException if a database access error occurs
Class Statement, int getMaxRows()

Retrieves the maximum number of rows that a ResultSet object can contain. If the limit is exceeded the excess rows are silently dropped. @return the current max row limit; zero means unlimited @exception SQLException if a database access error occurs
Class Statement, boolean getMoreResults()

Moves to a Statement object's next result. It returns true if this result is a ResultSet object. This method also implicitly closes any current ResultSet object obtained with the method getResultSet.

There are no more results when the following is true:

 ( getMoreResults() && (getUpdateCount() == -1) 
@return true if the next result is a ResultSet object; false if it is an update count or there are no more results @exception SQLException if a database access error occurs @see #execute
Class Statement, int getQueryTimeout()

Retrieves the number of seconds the driver will wait for a Statement object to execute. If the limit is exceeded a SQLException is thrown. @return the current query timeout limit in seconds; zero means unlimited @exception SQLException if a database access error occurs
Class Statement, ResultSet getResultSet()

Returns the current result as a ResultSet object. This method should be called only once per result. @return the current result as a ResultSet object; null if the result is an update count or there are no more results @exception SQLException if a database access error occurs @see #execute
Class Statement, int getResultSetConcurrency()

JDBC 2.0 Retrieves the result set concurrency for ResultSet objects generated by this Statement object. @return either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, int getResultSetType()

JDBC 2.0 DetermineRetrieves the result set type for ResultSet objects generated by this Statement object. @return one of ResultSet.TYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_SCROLL_SENSITIVE @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, int getUpdateCount()

Returns the current result as an update count; if the result is a ResultSet object or there are no more results -1 is returned. This method should be called only once per result. @return the current result as an update count; -1 if itthe current result is a ResultSet object or there are no more results @exception SQLException if a database access error occurs @see #execute
Class Statement, SQLWarning getWarnings()

Retrieves the first warning reported by calls on this Statement object. Subsequent Statement object warnings will be chained to this SQLWarning object.

The warning chain is automatically cleared each time a statement is (re)executed.

Note: If you are processing a ResultSet object any warnings associated with reads on that ResultSet readsobject will be chained on the ResultSet objectit. @return the first SQLWarning object or null @exception SQLException if a database access error occurs

Class Statement, void setCursorName(String)

Defines the SQL cursor name that will be used by subsequent Statement object execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet object generated by this statement. If the database doesn't support positioned update/delete this method is a noop. To insure that a cursor has the proper isolation level to support updates the cursor's SELECT statement should be of the form 'select for update ...'. If the 'for update' phrase is omitted positioned updates may fail.

Note: By definition positioned update/delete execution must be done by a different Statement object than the one which generated the ResultSet object being used for positioning. Also cursor names must be unique within a connection. @param name the new cursor name which must be unique within a connection @exception SQLException if a database access error occurs

Class Statement, void setEscapeProcessing(boolean)

Sets escape processing on or off. If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database. Note: Since prepared statements have usually been parsed prior to making this call disabling escape processing for prepared statements will have no effect. @param enable true to enable; false to disable @exception SQLException if a database access error occurs
Class Statement, void setFetchDirection(int)

JDBC 2.0 Gives the driver a hint as to the direction in which the rows in a result set will be processed. The hint applies only to result sets created using this Statement object. The default value is ResultSet.FETCH_FORWARD.

Note that this method sets the default fetch direction for result sets generated by this Statement object. Each result set has its own methods for getting and setting its own fetch direction. @param direction the initial direction for processing rows @exception SQLException if a database access error occurs or the given direction is not one of ResultSet.FETCH_FORWARD ResultSet.FETCH_REVERSE or ResultSet.FETCH_UNKNOWN @since 1.2 @see What Is in the JDBC 2.0 API

Class Statement, void setFetchSize(int)

JDBC 2.0 Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. The number of rows specified affects only result sets created using this statement. If the value specified is zero then the hint is ignored. The default value is zero. @param rows the number of rows to fetch @exception SQLException if a database access error occurs or the condition 0 < rows < this.getMaxRows() is not satisfied. @since 1.2 @see What Is in the JDBC 2.0 API
Class Statement, void setMaxFieldSize(int)

Sets the limit for the maximum number of bytes in a column to the given number of bytes. This is the maximum number of bytes that can be returned for any column value. This limit applies only to BINARY VARBINARY LONGVARBINARY CHAR VARCHAR and LONGVARCHAR fields. If the limit is exceeded the excess data is silently discarded. For maximum portability use values greater than 256. @param max the new max column size limit; zero means unlimited @exception SQLException if a database access error occurs
Class Statement, void setMaxRows(int)

Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. If the limit is exceeded the excess rows are silently dropped. @param max the new max rows limit; zero means unlimited @exception SQLException if a database access error occurs
Class Statement, void setQueryTimeout(int)

Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. If the limit is exceeded aan SQLException is thrown. @param seconds the new query timeout limit in seconds; zero means unlimited @exception SQLException if a database access error occurs

Class Struct

JDBC 2.0

The standard mapping in the Java programming language for an SQL structured type. A Struct object contains a value for each attribute of the SQL structured type that it represents. By default an instance ofStruct is valid as long as the application has a reference to it. @since 1.2 @see What Is in the JDBC 2.0 API

Class Struct, Object[] getAttributes(Map)

Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents. This method uses the given type map for customizations of the type mappings. If there is no entry in the given type map that matches the structured type that this Struct object represents the driver uses the standard mapping. This method never uses the type map associated with the connection.

Conceptually this method calls the method getObject on each attribute of the structured type and returns a Java array containing the result. @param map a mapping of SQL type names to Java classes @return an array containing the ordered attribute values @exception SQLException if a database access error occurs


Class Time

A thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value. The Time class adds formatting and parsing operations to support the JDBC escape syntax for time values.

The date components should be set to the "zero epoch" value of January 1 1970 and should not be accessed.

Class Time, constructor Time(int, int, int)

Constructs a Time object initialized with the given values for the hour minute and second. The driver sets the date components to January 1 1970. Any method that attempts to access the date components of a Time object will throw a java.lang.IllegalArgumentException. @param hour 0 to 23 @param minute 0 to 59 @param second 0 to 59 @deprecated Use the constructor that takes a milliseconds value in place of this constructor
Class Time, int getDate()

This method is deprecated and should not be used because SQL TimeTIME values do not have a date component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked
Class Time, int getDay()

This method is deprecated and should not be used because SQL TimeTIME values do not have a day component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked
Class Time, int getMonth()

This method is deprecated and should not be used because SQL TimeTIME values do not have a month component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked
Class Time, int getYear()

This method is deprecated and should not be used because SQL TimeTIME values do not have a year component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked
Class Time, void setDate(int)

This method is deprecated and should not be used because SQL TimeTIME values do not have a date component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked
Class Time, void setMonth(int)

This method is deprecated and should not be used because SQL TimeTIME values do not have a month component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked
Class Time, void setYear(int)

This method is deprecated and should not be used because SQL TimeTIME values do not have a year component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked
Class Time, String toString()

FormatFormats a time in JDBC date escape format @return a String in hh:mm:ss format

Class Timestamp

This class is aA thin wrapper around java.util.Date that allows the JDBC API to identify this as aan SQL TIMESTAMP value. It adds the ability to hold the SQL TIMESTAMP nanos value and provides formatting and parsing operations to support the JDBC escape syntax for timestamp values.

Note: This type is a composite of a java.util.Date and a separate nanosnanoseconds value. Only integral seconds are stored in the java.util.Date component. The fractional seconds - the nanos - are separate. The getTime method will return only integral seconds. If a time value that includes the fractional seconds is desired you must convert nanos to milliseconds (nanos/1000000) and add this to the getTime value. The Timestamp.equals(Object) method never returns true when passed a value of type java.util.Date because the nanos component of a date is unknown. As a result the Timestamp.equals(Object) method is not symmetric with respect to the java.util.Date.equals(Object) method. Also the hashcode method uses the underlying java.util.Data implementation and therefore does not include nanos in its computation. Due to the differences between the Timestamp class and the java.util.Date class mentioned above it is recommended that code not view Timestamp values generically as an instance of java.util.Date. The inheritance relationship between Timestamp and java.util.Date really denotes implementation inheritance and not type inheritance.

Class Timestamp, constructor Timestamp(int, int, int, int, int, int, int)

Constructs a Timestamp object initialized with the given values. @param year year-1900 @param month 0 to 11 @param daydate 1 to 31 @param hour 0 to 23 @param minute 0 to 59 @param second 0 to 59 @param nano 0 to 999 999 999 @deprecated instead use the constructor Timestamp(long millis)
Class Timestamp, boolean after(Timestamp)

Indicates whether this Timestamp object is later than the given Timestamp object. Is this timestamp later than the timestamp argument @param ts the Timestamp value to compare with @return true if this Timestamp object is later; false otherwise
Class Timestamp, boolean before(Timestamp)

Indicates whether this Timestamp object is earlier than the given Timestamp object. @param ts the Timestamp value to compare with @return true if this Timestamp object is earlier; false otherwise
Class Timestamp, boolean equals(Object)

Tests to see if this Timestamp object is equal to the given object. This version of the method equals has been added to fix the incorrect signature of Timestamp.equals(Timestamp) and to preserve backward compatibility with existing class files. Note: This method is not symmetric with respect to the equals(Object) method in the base class. @param ts the Object value to compare with
Class Timestamp, void setNanos(int)

Sets this Timestamp object's nanos valuefield to the given value. @param n the new fractional seconds component @exception java.lang.IllegalArgumentException if the given argument is greater than 999999999 or less than 0
Class Timestamp, String toString()

Formats a timestamp in JDBC timestamp escape format. @return a String object in yyyy-mm-dd hh:mm:ss.fffffffff format @overrides toString in class java.util.Date
Class Timestamp, Timestamp valueOf(String)

Converts a stringString object in JDBC timestamp escape format to a Timestamp value. @param s timestamp in format yyyy-mm-dd hh:mm:ss.fffffffff @return corresponding Timestamp value @exception java.lang.IllegalArgumentException if the given argument does not have the format yyyy-mm-dd hh:mm:ss.fffffffff

Class Types

The class that defines the constants that are used to identify generic SQL types called JDBC types. The actual type constant values are equivalent to those in XOPEN.

This class is never instantiated.

Class Types, int ARRAY

JDBCThe 2.0constant in the Java programming language Asometimes referred to as a type representing ancode that identifies the generic SQL type ARRAY. @since 1.2 @see What Is in the JDBC 2.0 API
Class Types, int BLOB

JDBCThe 2.0constant in the Java programming Alanguage sometimes referred to as a type representingcode that identifies the angeneric SQL Binarytype BLOB. @since 1.2 @see LargeWhat ObjectIs in the JDBC 2.0 API
Class Types, int CLOB

JDBCThe 2.0constant in the Java programming Alanguage sometimes referred to as a type representingcode that identifies the angeneric SQL Charactertype CLOB. @since 1.2 @see LargeWhat ObjectIs in the JDBC 2.0 API
Class Types, int DISTINCT

JDBCThe 2.0constant Ain typethe Java based onprogramming language sometimes referred to as a built-intype code that identifies the generic SQL type DISTINCT. One@since 1.2 of@see theWhat twoIs user-definedin data typesthe JDBC (UDTs)2.0 API
Class Types, int JAVA_OBJECT

JDBCThe 2.0constant Ain typethe Java programming language sometimes representingreferred to as a Javatype code that identifies the generic ObjectSQL type JAVA_OBJECT. @since 1.2 @see What Is in the JDBC 2.0 API
Class Types, int OTHER

OTHERThe constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.
Class Types, int REF

JDBCThe 2.0constant in the Java programming language Asometimes referred to as a type representing ancode that identifies the generic SQL type REF. @since 1.2 @see What Is in the JDBC 2.0 API
Class Types, int STRUCT

JDBCThe 2.0constant Ain typethe Java programming language sometimes referred to as consisting of attributesa type code that mayidentifies the be anygeneric SQL type STRUCT. One@since of1.2 the@see twoWhat user-definedIs datain typesthe JDBC (UDTs)2.0 API