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

The mapping in the Java programming language for the SQL type ARRAY. By default an Array objectvalue is a transaction-duration reference to an SQL ARRAY 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@since API1.2

Class Array, Object getArray()

Retrieves the contents of the SQL ARRAY 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 value designated by this Array 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 arrayARRAY value designated by this Array object. 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 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)

ReturnsRetrieves an array containing a slice of the SQL ARRAY 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)

ReturnsRetreives an array containing a slice of the SQL arrayARRAY objectvalue 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 arrayARRAY value 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()

ReturnsRetrieves 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()

ReturnsRetrieves 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()

ReturnsRetrieves a result set that contains the elements of the SQL 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)

ReturnsRetrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object. 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 getResultSet uses either the given type map or the standard mapping; it never uses the type map associated with the 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 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)

ReturnsRetrieves 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 stores 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)

ReturnsRetrieves 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 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 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

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 -3Statement.EXECUTE_FAILED.

This class is new in the JDBC 2.0@since API1.2

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 used 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. -2Statement.SUCCESS_NO_INFO to indicate that the command executed successfully but the number of rows affected is unknown
  3. -3Statement.EXECUTE_FAILED to indicate that the command failed to execute successfully
@since 1.3 @see What Is in the JDBC 2.0 API

Class Blob

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. TheBy default driver implementsdrivers implement 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 an 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. In This class is new in the JDBCaddition this interface has methods for updating 2.0a BLOB APIvalue. @since 1.2

Class Blob, InputStream getBinaryStream()

Retrieves the BLOB value 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.2value @see What Is in#setBinaryStream the JDBC@since 21.0 API2
Class Blob, byte[] getBytes(long, int)

ReturnsRetrieves as an array of bytes partall or allpart of the BLOB value that this Blob object designatesrepresents as an array of bytes. TheThis 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 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.2value @see What#setBytes Is in the JDBC@since 21.0 API2
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)

DeterminesRetrieves 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 value @since 1.2 @see What Is in the JDBC 2.0 API
Class Blob, long position(byte[], long)

DeterminesRetrieves the byte position at which the specified byte array 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. The JDBC API 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 with the first parameter being 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 object or multiple ResultSet objects. 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)

GetsRetrieves the value of athe designated 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)

GetsRetrieves the value of athe designated 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#setBigDecimal in the JDBC@since 21.0 API2
Class CallableStatement, BigDecimal getBigDecimal(int, int)

GetsRetrieves the value of athe designated 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 use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName) @see #setBigDecimal
Class CallableStatement, Blob getBlob(int)

GetsRetrieves the value of athe designated 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)

GetsRetrieves the value of athe designated 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 @see #setBoolean
Class CallableStatement, byte getByte(int)

GetsRetrieves the value of athe designated 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 @see #setByte
Class CallableStatement, byte[] getBytes(int)

GetsRetrieves the value of athe designated JDBC BINARY or VARBINARY parameter as an array of byte values 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 @see #setBytes
Class CallableStatement, Clob getClob(int)

GetsRetrieves the value of athe designated 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)

GetsRetrieves the value of athe designated 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 @see #setDate
Class CallableStatement, Date getDate(int, Calendar)

GetsRetrieves the value of athe designated 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 @see #setDate @since 1.2
Class CallableStatement, double getDouble(int)

GetsRetrieves the value of athe designated 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 @see #setDouble
Class CallableStatement, float getFloat(int)

GetsRetrieves the value of athe designated 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 @see #setFloat
Class CallableStatement, int getInt(int)

GetsRetrieves the value of athe designated 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 @see #setInt
Class CallableStatement, long getLong(int)

GetsRetrieves the value of athe designated 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 @see #setLong
Class CallableStatement, Object getObject(int)

GetsRetrieves the value of athe designated parameter as an Object in the Java programming language. If the value is an SQL NULL the driver returns a Java null.

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 the 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 @see #setObject

Class CallableStatement, Object getObject(int, Map)

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#setObject the JDBC@since 21.0 API2

Class CallableStatement, Ref getRef(int)

GetsRetrieves the value of athe designated 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)

GetsRetrieves the value of athe designated 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 @see #setShort
Class CallableStatement, String getString(int)

Retrieves the value of athe designated 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 @see #setString

Class CallableStatement, Time getTime(int)

GetRetrieves the value of athe designated 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 @see #setTime
Class CallableStatement, Time getTime(int, Calendar)

GetsRetrieves the value of athe designated 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 @see #setTime @since 1.2
Class CallableStatement, Timestamp getTimestamp(int)

GetsRetrieves the value of athe designated 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 @see #setTimestamp
Class CallableStatement, Timestamp getTimestamp(int, Calendar)

GetsRetrieves the value of athe designated 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 @see #setTimestamp @since 1.2
Class CallableStatement, void registerOutParameter(int, int, String)

Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-nameddefined or REF output parameter. Examples of user-nameddefined 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-nameddefined 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-nameddefined and REF parameters. Although it is intended for user-nameddefined and REF parameters this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-nameddefined or REF type the typeName parameter is ignored.

Note: When reading the value of an out parameter you must use the getXXXgetter method whose Java type XXX corresponds to the parameter's registered SQL type. @param parameterIndexparamIndex 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, void registerOutParameter(int, int, int)

Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType. This method must be called 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.

This version of registerOutParameter should be used when the parameter is of JDBC type NUMERIC or DECIMAL. @param parameterIndex the first parameter is 1 the second is 2 and so on @param sqlType the SQL type code defined by java.sql.Types. @param scale the desired number of digits to the right of the decimal point. It must be greater than or equal to zero. @exception SQLException if a database access error occurs @see Types

Class CallableStatement, boolean wasNull()

IndicatesRetrieves whether or not the last OUT parameter read had the value of SQL NULL. Note that this method should be called only after calling a getXXXgetter 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

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. TheBy default driver implementsdrivers implement 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 an SQL CLOB value. In This class is new in the JDBCaddition this interface has methods for updating 2a CLOB value.0 API@since 1.2

Class Clob, InputStream getAsciiStream()

GetsRetrieves the CLOB value designated by this Clob object as a stream ofan Ascii bytesascii stream. @return ana asciijava.io.InputStream streamobject containing the CLOB data @exception SQLException if there is an error accessing the CLOB value @since 1.2 @see What Is in#setAsciiStream the JDBC@since 21.0 API2
Class Clob, Reader getCharacterStream()

GetsRetrieves the CLOB value designated by this Clob object as a Unicodejava.io.Reader object (or as a stream of characters). @return a Unicodejava.io.Reader streamobject containing the CLOB data @exception SQLException if there is an error accessing the CLOB value @since 1.2 @see What Is#setCharacterStream in the JDBC@since 21.0 API2
Class Clob, String getSubString(long, int)

ReturnsRetrieves 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 value @since 1.2 @see What Is in the JDBC 2.0 API
Class Clob, long length()

ReturnsRetrieves 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 value @since 1.2 @see What Is in the JDBC 2.0 API
Class Clob, long position(Clob, long)

DeterminesRetrieves 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 elseor -1 if it is not present; 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)

DeterminesRetrieves 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 elseor -1 if it is not present; 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 within the context of a connection.

A Connection object'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 thea Connection object is in auto-commit mode which means that it automatically commits changes after executing each statement. If auto -commit mode has been disabled the method commit must be called explicitly in order to commit changes; otherwise database changes will not be saved. @see

DriverManager#getConnectionA @seenew StatementConnection @seeobject created using the JDBC 2.1 core API has an initially empty type map associated with it. A user may enter a custom mapping for a UDT in this type map. When a UDT is retrieved from a data source with the method ResultSet.getObject @the getObject method will check the connection's type map to see DatabaseMetaDataif there is an Methodsentry for that areUDT. If so the getObject method will map the UDT to the class indicated. If there is no entry the UDT will be mapped using the standard mapping.

A user may create a new type map which is a java.util.Map object make an entry in it and pass it to the JDBCjava.sql 2methods that can perform custom mapping.0 API are taggedIn this case @sincethe 1method will use the given type map instead of the one associated with the connection.2

For example the following code fragment specifies that the SQL type ATHLETES will be mapped to the class Athletes in the Java programming language. The code fragment retrieves the type map for the Connection object con inserts the entry into it and then sets the type map with the new entry as the connection's type map.

 java.util.Map map = con.getTypeMap(); map.put("mySchemaName.ATHLETES" Class.forName("Athletes")); con.setTypeMap(map); 
@see DriverManager#getConnection @see Statement @see ResultSet @see DatabaseMetaData
Class Connection, void clearWarnings()

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

Releases athis Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.

Calling the method close on a Connection object that is already closed is a no-op.

Note: A Connection object is automatically closed when it is garbage collected. Certain fatal errors also resultclose in a closed Connection object. @exception SQLException if a database access error occurs

Class Connection, void commit()

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by thethis Connection object. This method should be used only when auto-commit mode has been disabled. @exception SQLException if a database access error occurs or this Connection object is in auto-commit mode @see #setAutoCommit
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 ismay be more efficient to use a PreparedStatement object.

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

Class Connection, Statement createStatement(int, int)

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; seeone of ResultSet.TYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @param resultSetConcurrency a concurrency type; seeone of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_XXXUPDATABLE @return a new Statement object that will generate ResultSet objects with the given type and concurrency @exception SQLException if a database access error occurs @sinceor 1.2the @seegiven Whatparameters Is inare not theResultSet JDBCconstants 2.0indicating type and concurrency @since API1.2
Class Connection, boolean getAutoCommit()

GetsRetrieves the current auto-commit statemode for this Connection object. @return the current state of this Connection object's auto-commit mode @exception SQLException if a database access error occurs @see #setAutoCommit
Class Connection, String getCatalog()

Returns theRetrieves this Connection object's current catalog name. @return the current catalog name or null if there is none @exception SQLException if a database access error occurs @see #setCatalog
Class Connection, DatabaseMetaData getMetaData()

Gets theRetrieves a metadataDatabaseMetaData regarding thisobject that connection'scontains metadata about the database. to Awhich this Connection's database is ableobject represents a toconnection. The metadata provideincludes information describingabout itsthe database's tables its supported SQL grammar its stored procedures the capabilities of this connection and so on. This information is made available through a DatabaseMetaData object. @return a DatabaseMetaData object for this Connection object @exception SQLException if a database access error occurs
Class Connection, int getTransactionIsolation()

GetsRetrieves this Connection object's current transaction isolation level. @return the current transaction isolation level which will be one of the following constants: Connection.TRANSACTION_READ_UNCOMMITTED Connection.TRANSACTION_READ_COMMITTED Connection.TRANSACTION_REPEATABLE_READ Connection.TRANSACTION_*SERIALIZABLE modeor valueConnection.TRANSACTION_NONE. @exception SQLException if a database access error occurs @see #setTransactionIsolation
Class Connection, Map getTypeMap()

GetsRetrieves the type mapMap object associated with this connectionConnection object. 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2@since 1.02 @see API#setTypeMap
Class Connection, SQLWarning getWarnings()

ReturnsRetrieves the first warning reported by calls on this Connection object. If there is more than one warning subsequent warnings will be chained to the first one and can be retrieved by calling the method SQLWarning.getNextWarning on the warning that was retrieved previously.

This method may not be called on a closed connection; doing so will cause an SQLException to be thrown.

Note: Subsequent warnings will be chained to this SQLWarning. @return the first SQLWarning object or null if there are none @exception SQLException if a database access error occurs or this method is called on a closed connection @see SQLWarning

Class Connection, boolean isClosed()

TestsRetrieves towhether this Connection object has been closed. A connection is seeclosed if athe method close has been called on it or if certain fatal errors have occurred. This method is guaranteed to return true only when it is called after the method Connection.close has been called.

This method generally cannot be called to determine whether a connection to a database is closedvalid or invalid. A typical client can determine that a connection is invalid by catching any exceptions that might be thrown when an operation is attempted. @return true if thethis connectionConnection object is closed; false if it's is still open @exception SQLException if a database access error occurs

Class Connection, boolean isReadOnly()

Tests to seeRetrieves whether this if theConnection connectionobject is in read-only mode. @return true if connectionthis Connection object is read-only and; false otherwise @exception SQLException if a database access error occurs
Class Connection, String nativeSQL(String)

Converts the given SQL statement into the system's native SQL grammar. A driver may convert the JDBC sqlSQL grammar into its system's native SQL grammar prior to sending it;. thisThis method returns the native form of the statement that the driver would have sent. @param sql aan SQL statement that may contain one or more ' ' parameter placeholders @return the native form of this statement @exception SQLException if a database access error occurs
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.

Result sets created using the returned CallableStatement object will haveby forward-onlydefault be type TYPE_FORWARD_ONLY and read-onlyhave a concurrency bylevel defaultof CONCUR_READ_ONLY. @param sql aan SQL statement that may contain one or more ' ' parameter placeholders. Typically this statement is a JDBC function call escape string. @return a new default CallableStatement object containing the pre-compiled SQL statement @exception SQLException if a database access error occurs

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

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 sql a String object that is the SQL statement to be sent to the database; may contain on or more parameters @param resultSetType a result set type; seeone of ResultSet.TYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @param resultSetConcurrency a concurrency type; seeone of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_XXXUPDATABLE @return a new CallableStatement object containing the pre-compiled SQL statement that will produce ResultSet objects with the given type and concurrency @exception SQLException if a database access error occurs @sinceor 1.2the @seegiven Whatparameters Is inare not theResultSet JDBCconstants 2.0indicating type and APIconcurrency @since 1.2
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 object is executed. This has no direct effect on users; however it does affect which method throwsmethods throw certain SQLExceptionsSQLException objects.

Result sets created using the returned PreparedStatement object will haveby forward-onlydefault be type TYPE_FORWARD_ONLY and read-onlyhave a concurrency bylevel defaultof CONCUR_READ_ONLY. @param sql aan SQL statement that may contain one or more ' ' IN parameter placeholders @return a new default PreparedStatement object containing the pre-compiled SQL statement @exception SQLException if a database access error occurs

Class Connection, void rollback()

DropsUndoes all changes made sincein the previouscurrent commit/rollbacktransaction and releases any database locks currently held by this Connection object. This method should be used only when auto- commit mode has been disabled. @exception SQLException if a database access error occurs or this Connection object is in auto-commit mode @see #setAutoCommit
Class Connection, void setAutoCommit(boolean)

Sets this connection's auto-commit mode to the given state. If a connection is in auto-commit mode then all its SQL statements will be executed and committed as individual transactions. Otherwise its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default new connections are in auto-commit mode.

The commit occurs when the statement completes or the next execute occurs whichever comes first. In the case of statements returning a ResultSet object the statement completes when the last row of the ResultSet object has been retrieved or the ResultSet object has been closed. In advanced cases a single statement may return multiple results as well as output parameter values. In these cases the commit occurs when all results and output parameter values have been retrieved.

NOTE: If this method is called during a transaction the transaction is committed. @param autoCommit true to enablesenable auto-commit mode; false disablesto auto-commit.disable it @exception SQLException if a database access error occurs @see #getAutoCommit

Class Connection, void setCatalog(String)

Sets athe given catalog name in order to select a subspace of this Connection object's database in which to work.

If the driver does not support catalogs it will silently ignore this request. @param catalog the name of a catalog (subspace in this Connection object's database) in which to work @exception SQLException if a database access error occurs @see #getCatalog

Class Connection, void setReadOnly(boolean)

Puts this connection in read-only mode as a hint to the driver to enable database optimizations.

Note: This method cannot be called while in the middleduring of a transaction. @param readOnly true enables read-only mode; false disables read-only mode.it @exception SQLException if a database access error occurs or this method is called during a transaction

Class Connection, void setTransactionIsolation(int)

Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.

Note: This method cannot beIf this method is called whileduring in the middle of aa transaction the result is transactionimplementation-defined. @param level one of the following Connection constants: Connection.TRANSACTION_*READ_UNCOMMITTED isolationConnection.TRANSACTION_READ_COMMITTED valuesConnection.TRANSACTION_REPEATABLE_READ withor theConnection.TRANSACTION_SERIALIZABLE. exception(Note ofthat Connection.TRANSACTION_NONE; cannot some databases maybe used because notit specifies support otherthat transactions valuesare not supported.) @exception SQLException if a database access error occurs or the given parameter is not one of the Connection constants @see DatabaseMetaData#supportsTransactionIsolationLevel @see #getTransactionIsolation

Class Connection, void setTypeMap(Map)

Installs the given typeTypeMap mapobject as the type map for this connectionConnection object. The type map will be used for the custom mapping of SQL structured types and distinct types. @param map the java.util.Map object to install as the replacement for this Connection object's default type map @sinceexception 1.2SQLException @seeif Whata Is indatabase access error occurs or the JDBCgiven 2parameter is not a java.util.Map object @since 1.02 @see API#getTypeMap
Class Connection, int TRANSACTION_NONE

IndicatesA constant indicating that transactions are not supported.
Class Connection, int TRANSACTION_READ_COMMITTED

DirtyA constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur. This level only prohibits a transaction from reading a row with uncommitted changes in it.
Class Connection, int TRANSACTION_READ_UNCOMMITTED

DirtyA constant indicating that dirty reads non-repeatable reads and phantom reads can occur. This level allows a row changed by one transaction to be read by another transaction before any changes in that row have been committed (a "dirty read"). If any of the changes are rolled back the second transaction will have retrieved an invalid row.
Class Connection, int TRANSACTION_REPEATABLE_READ

DirtyA constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur. This level prohibits a transaction from reading a row with uncommitted changes in it and it also prohibits the situation where one transaction reads a row a second transaction alters the row and the first transaction rereads the row getting different values the second time (a "non-repeatable read").
Class Connection, int TRANSACTION_SERIALIZABLE

DirtyA constant indicating that dirty reads non-repeatable reads and phantom reads are prevented. This level includes the prohibitions in TRANSACTION_REPEATABLE_READ and further prohibits the situation where one transaction reads all rows that satisfy a WHERE condition a second transaction inserts a row that satisfies that WHERE condition and the first transaction rereads for the same condition retrieving the additional "phantom" row in the second read.

Class DatabaseMetaData

Comprehensive information about the database as a whole.

Many This interface is implemented by driver vendors to let users know the capabilities of a Database Management System (DBMS) in combination with the driver based on JDBCTM technology ("JDBC driver") that is used with it. Different relational DBMSs often support different features implement features in different ways and use different data types. In addition a driver may implement a feature on top of what the DBMS offers. Information returned by methods herein this interface applies to the capabilities of a particular driver and a particular DBMS working together. Note that as used in this documentation the term "database" is used generically to refer to both the driver and DBMS.

A user for this interface is commonly a tool that needs to discover how to deal with the underlying DBMS. This is especially true for applications that are intended to be used with more than one DBMS. For example a tool might use the method getTypeInfo to find out what data types can be used in a CREATE TABLE statement. Or a user might call the method supportsCorrelatedSubqueries to see if it is possible to use a correlated subquery or supportsBatchUpdates to see if it is possible to use batch updates.

Some DatabaseMetaData methods return lists of information in the form of ResultSet objects. YouRegular can use the normal ResultSet methods such as getString and getInt can be used to retrieve the data from these ResultSet objects. If a given form of metadata is not available thesethe methodsResultSet shouldgetter methods throw an SQLException.

Some ofSome theseDatabaseMetaData 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 criteriacriterion will be dropped from the search.

An SQLExceptionA will be thrownmethod that gets ifinformation about a feature that the driver does not support a meta datawill throw an methodSQLException. In the case of methods that return a ResultSet object either a ResultSet object (which may be empty) is returned or aan SQLException is thrown.

Class DatabaseMetaData, boolean allProceduresAreCallable()

Can allRetrieves whether the procedurescurrent returned byuser can getProcedurescall all bethe procedures calledreturned by the currentmethod usergetProcedures. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean allTablesAreSelectable()

CanRetrieves whether the current user can use all the tables returned by getTable bethe method SELECTedgetTables by thein a currentSELECT userstatement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean dataDefinitionCausesTransactionCommit()

DoesRetrieves whether a data definition statement within a transaction forceforces the transaction to commit. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean dataDefinitionIgnoredInTransactions()

IsRetrieves whether this database ignores a data definition statement within a transaction ignored. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean deletesAreDetected(int)

IndicatesRetrieves whether or not a visible row delete can be detected by calling the method ResultSet.rowDeleted(). If the method deletesAreDetected() returns false thenit means that deleted rows are removed from the result set. @param result settype the ResultSet type; one iof ResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @return true if changesdeletes are detected by the resultsetgiven 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 doesMaxRowSizeIncludeBlobs()

DidRetrieves whether the return value for the method getMaxRowSize() includeincludes the SQL data types LONGVARCHAR and LONGVARBINARY blobs. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getBestRowIdentifier(String, String, String, int, boolean)

GetsRetrieves 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be used to selectionnarrow criteriathe search @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param table a table name; must match the table name as it is stored in the database @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, String getCatalogSeparator()

What'sRetrieves the String that this database uses as the separator between a catalog and table name. @return the separator string @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getCatalogTerm()

What'sRetrieves the database vendor's preferred term for "catalog". @return the vendor term for "catalog" @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getCatalogs()

GetsRetrieves 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 a ResultSet -object in which 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)

GetsRetrieves 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name from the selectionshould not be criteriaused to narrow the search @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param table a table name; must match the table name as it is stored in the database @param columnNamePattern a column name pattern; must match the column name as it is stored in the database @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)

GetsRetrieves 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.
  19. SCOPE_CATLOG String => catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
  20. SCOPE_SCHEMA String => schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
  21. SCOPE_TABLE String => table name that this the scope of a reference attribure (null if the DATA_TYPE isn't REF)
  22. SOURCE_DATA_TYPE short => source type of a distinct type or user-generated Ref type SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
@param catalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name from the selectionshould not be criteriaused to narrow the search @param schemaPattern a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param tableNamePattern a table name pattern; must match the table name as it is stored in the database @param columnNamePattern a column name pattern; must match the column name as it is stored in the database @return ResultSet - each row is a column description @exception SQLException if a database access error occurs @see #getSearchStringEscape
Class DatabaseMetaData, Connection getConnection()

Retrieves the connection that produced this metadata object.

@return the connection that produced this metadata object @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2

Class DatabaseMetaData, ResultSet getCrossReference(String, String, String, String, String, String)

GetsRetrieves a description of the foreign key columns in the given foreign key table that reference the primary key columns of the given primary key table (describe how one table imports another's key.). This should normally return a single foreign key/primary key pair (because most tables only import a foreign key from a table only 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param primarySchema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means drop schema name from the selection criteria @param primaryTable the table name of the table that exports the key; must match the table name as it is stored in the database @param foreignCatalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means drop catalog name from the selection criteria @param foreignSchema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means drop schema name from the selection criteria @param foreignTable the table name of the table that imports the key; must match the table name as it is stored in the database @return ResultSet - each row is a foreign key column description @exception SQLException if a database access error occurs @see #getImportedKeys
Class DatabaseMetaData, String getDatabaseProductName()

What'sRetrieves the name of this database product. @return database product name @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getDatabaseProductVersion()

What'sRetrieves the version number of this database product. @return database version number @exception SQLException if a database access error occurs
Class DatabaseMetaData, int getDefaultTransactionIsolation()

What'sRetrieves thethis database's default transaction isolation level. The possible values are defined in java.sql.Connection. @return the default isolation level @exception SQLException if a database access error occurs @see Connection
Class DatabaseMetaData, int getDriverMajorVersion()

What'sRetrieves this JDBC driver's major version number. @return JDBC driver major version
Class DatabaseMetaData, int getDriverMinorVersion()

What'sRetrieves this JDBC driver's minor version number. @return JDBC driver minor version number
Class DatabaseMetaData, String getDriverName()

What'sRetrieves the name of this JDBC driver. @return JDBC driver name @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getDriverVersion()

What'sRetrieves the version number of this JDBC driver as a String. @return JDBC driver version @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getExportedKeys(String, String, String)

GetsRetrieves a description of the foreign key columns that reference athe given 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; must match the catalog name as it is stored in this database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be used selectionto narrow the criteriasearch @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param table a table name; must match the table name as it is stored in this database @return a ResultSet -object in which each row is a foreign key column description @exception SQLException if a database access error occurs @see #getImportedKeys
Class DatabaseMetaData, String getExtraNameCharacters()

GetsRetrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z A-Z 0-9 and _). @return the string containing the extra characters @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getIdentifierQuoteString()

What'sRetrieves the string used to quote SQL identifiers. This method returns a space " " if identifier quoting isn'tis not supported. A JDBC@return CompliantTMthe driver always usesquoting string or a double quotespace character.if @returnquoting the quoting stringis not supported @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getImportedKeys(String, String, String)

GetsRetrieves 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 a foreign key
  10. UPDATE_RULE short => What happens to a foreign key when the primary key 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be used to narrow selection criteriathe search @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param table a table name; must match the table name as it is stored in the database @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)

GetsRetrieves a description of athe given 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; must match the catalog name as it is stored in this database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be used to selectionnarrow criteriathe search @param schema a schema name; must match the schema name as it is stored in this database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param table a table name; must match the table name as it is stored in this database @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 getMaxBinaryLiteralLength()

HowRetrieves manythe maximum number of hex characters can you havethis database allows in an inline binary literal. @return max binary literalthe maximum length (in hex characters) for a binary literal; 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 getMaxCatalogNameLength()

What'sRetrieves the maximum lengthnumber of characters that this database allows in a catalog name. @return maxthe namemaximum number of characters lengthallowed in bytesa catalog name; 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 getMaxCharLiteralLength()

What'sRetrieves the max lengthmaximum number of characters this database allows for a character literal. @return maxthe literalmaximum number of characters allowed for lengtha character literal; 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 getMaxColumnNameLength()

What'sRetrieves the limitmaximum number of characters this ondatabase allows for a column name length. @return maxthe maximum number of characters allowed for a column name length; 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 getMaxColumnsInGroupBy()

What'sRetrieves the maximum number of columns this database allows in a "GROUP BY" clause. @return maxthe maximum number of columns allowed; 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 getMaxColumnsInIndex()

What'sRetrieves the maximum number of columns allowedthis database allows in an index. @return maxthe maximum number of columns allowed; 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 getMaxColumnsInOrderBy()

What'sRetrieves the maximum number of columns this database allows in an "ORDER BY" clause. @return maxthe maximum number of columns allowed; 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 getMaxColumnsInSelect()

What'sRetrieves the maximum number of columns this database allows in a "SELECT" list. @return maxthe maximum number of columns allowed; 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 getMaxColumnsInTable()

What'sRetrieves the maximum number of columns this database allows in a table. @return maxthe maximum number of columns allowed; 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 getMaxConnections()

HowRetrieves many active connections canthe we have at a timemaximum number of concurrent connections to this database that are possible. @return maxthe maximum number of active connections possible at one time; 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 getMaxCursorNameLength()

What'sRetrieves the maximum number of characters that this database allows in a cursor name. length @return max cursorthe maximum namenumber of lengthcharacters allowed in bytesa cursor name; 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 getMaxIndexLength()

Retrieves the maximum number of bytes this database allows for an index including all of the parts of the index. @return max index length inthe maximum number of bytes whichallowed; this limit 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 getMaxProcedureNameLength()

What'sRetrieves the maximum lengthnumber of characters that this database allows in a procedure name. @return maxthe namemaximum number of characters lengthallowed in bytesa procedure name; 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 getMaxRowSize()

What'sRetrieves the maximum lengthnumber of bytes this database allows in a single row. @return max row size inthe maximum number of bytes allowed for a row; 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 getMaxSchemaNameLength()

What'sRetrieves the maximum lengthnumber allowedof characters that this fordatabase allows in a schema name. @return maxthe namemaximum number of characters lengthallowed in bytesa schema name; 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'sRetrieves the maximum lengthnumber of characters this database allows in an SQL statement. @return max length inthe maximum number bytesof characters allowed for an SQL statement; 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 getMaxStatements()

HowRetrieves manythe maximum number of active statements can we have open at one time to thisto this database that can be open at the databasesame time. @return the maximum number of statements that can be open at one time; 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 getMaxTableNameLength()

What'sRetrieves the maximum lengthnumber of characters this database allows in a table name. @return max name lengththe maximum number inof characters allowed for bytesa table name; 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 getMaxTablesInSelect()

What'sRetrieves the maximum number of tables this database allows in a SELECT statement. @return the maximum number of tables allowed in a SELECT statement; 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 getMaxUserNameLength()

What'sRetrieves the maximum lengthnumber of characters this database allows in a user name. @return max user name lengththe maximum number of incharacters allowed for bytesa user name; 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, String getNumericFunctions()

GetsRetrieves a comma-separated list of math functions available with this database. These are the XOpen /Open CLI math function names used in the JDBC function escape clause. @return the list of math functions supported by this database @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getPrimaryKeys(String, String, String)

GetsRetrieves a description of athe given 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name from theshould not selectionbe used to narrow the criteriasearch @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param table a table name; must match the table name as it is stored in the database @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)

GetsRetrieves a description of athe given catalog's stored procedure parametersparameter 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be selectionused criteriato narrow the search @param schemaPattern a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param procedureNamePattern a procedure name pattern; must match the procedure name as it is stored in the database @param columnNamePattern a column name pattern; must match the column name as it is stored in the database @return ResultSet - each row describes a stored procedure parameter or column @exception SQLException if a database access error occurs @see #getSearchStringEscape

Class DatabaseMetaData, String getProcedureTerm()

What'sRetrieves the database vendor's preferred term for "procedure". @return the vendor term for "procedure" @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getProcedures(String, String, String)

GetsRetrieves a description of the stored procedures available in athe given 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be selectionused criteriato narrow the search @param schemaPattern a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param procedureNamePattern a procedure name pattern; must match the procedure name as it is stored in the database @return ResultSet - each row is a procedure description @exception SQLException if a database access error occurs @see #getSearchStringEscape
Class DatabaseMetaData, String getSQLKeywords()

GetsRetrieves a comma-separated list of all aof this database's SQL keywords that are NOT also SQL92 keywords. @return the list of this database's keywords that are not also SQL92 keywords @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getSchemaTerm()

What'sRetrieves the database vendor's preferred term for "schema". @return the vendor term for "schema" @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getSchemas()

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

The schema column is:

  1. TABLE_SCHEM String => schema name
  2. TABLE_CATALOG @returnString => catalog name (may be ResultSetnull) -
each@return rowa hasResultSet a single String column thatobject in which each row is a schema namedecription @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getSearchStringEscape()

GetsRetrieves the string that can be used to escape wildcard characters. This is the string that can be used to escape '_' or '%' in the stringcatalog search parameters that are a pattern style(and catalog searchtherefore use parametersone of the wildcard characters).

The '_' character represents any single character.; Thethe '%' character represents any sequence of zero or more characters. @return the string used to escape wildcard characters @exception SQLException if a database access error occurs

Class DatabaseMetaData, String getStringFunctions()

GetsRetrieves a comma-separated list of string functions available with this database. These are the X/Open Group CLI string function names used in the JDBC function escape clause. @return the list of string functions supported by this database @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getSystemFunctions()

GetsRetrieves a comma-separated list of system functions available with this database. These are the X/Open Group CLI system function names used in the JDBC function escape clause. @return thea list of system functions supported by this database @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getTablePrivileges(String, String, String)

GetsRetrieves 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 priviledgeprivilege 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be selectionused criteriato narrow the search @param schemaPattern a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param tableNamePattern a table name pattern; must match the table name as it is stored in the database @return ResultSet - each row is a table privilege description @exception SQLException if a database access error occurs @see #getSearchStringEscape
Class DatabaseMetaData, ResultSet getTableTypes()

GetsRetrieves 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 a ResultSet -object in which 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[])

GetsRetrieves a description of the tables available in athe given 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
  6. TYPE_CAT String => the types catalog (may be null)
  7. TYPE_SCHEM String => the types schema (may be null)
  8. TYPE_NAME String => type name (may be null)
  9. SELF_REFERENCING_COL_NAME String => name of the designated "identifier" column of a typed table (may be null)
  10. REF_GENERATION String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM" "USER" "DERIVED". (may be null)

Note: Some databases may not return information for all tables. @param catalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be selectionused criteriato narrow the search @param schemaPattern a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param tableNamePattern a table name pattern; must match the table name as it is stored in the database @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, String getTimeDateFunctions()

GetsRetrieves a comma-separated list of the time and date functions available with this database. @return the list of time and date functions supported by this database @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getTypeInfo()

GetsRetrieves 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 a ResultSet -object in which each row is an SQL type description @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getUDTs(String, String, String, int[])

GetsRetrieves a description of the user-defined types (UDTs) 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
  7. BASE_TYPE short => type code of the source type of a DISTINCT type or the type that implements the user-generated reference type of the SELF_REFERENCING_COLUMN of a structured type as defined in java.sql.Types (null if DATA_TYPE is not DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED)

Note: If the driver does not support UDTs an empty result set is returned. @param catalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be selectionused criteriato narrow the search @param schemaPattern a schema pattern name; patternmust match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param typeNamePattern a type name pattern; must match the type name as it is stored in the database; may be a fully- qualified name @param types a list of user-nameddefined types to include (JAVA_OBJECT STRUCT or DISTINCT) to include; null returns all types @return ResultSet -object in which each row isdescribes a type descriptionUDT @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API

Class DatabaseMetaData, String getURL()

What'sRetrieves the urlURL for this databaseDBMS. @return the urlURL for this DBMS or null if it cannot be generated @exception SQLException if a database access error occurs
Class DatabaseMetaData, String getUserName()

What'sRetrieves ourthe user name as known to thethis database. @return ourthe database user name @exception SQLException if a database access error occurs
Class DatabaseMetaData, ResultSet getVersionColumns(String, String, String)

GetsRetrieves 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 => iswhether this ais 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; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means dropthat the catalog name fromshould thenot be selectionused to narrow the criteriasearch @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search @param table a table name; must match the table name as it is stored in the database @return a ResultSet -object in which each row is a column description @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean insertsAreDetected(int)

IndicatesRetrieves whether or not a visible row insert can be detected by calling the method ResultSet.rowInserted(). @param resulttype setthe ResultSet type; one of iResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @return true if changes are detected by the resultsetspecified 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 isCatalogAtStart()

DoesRetrieves whether a catalog appearappears at the start of a fully qualified table name. If (Otherwisenot itthe catalog appears at the end). @return true if itthe catalog name appears at the startbeginning of a fully qualified table name; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean isReadOnly()

Is theRetrieves whether this database is in read-only mode. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean nullPlusNonNullIsNull()

AreRetrieves whether this database supports concatenations between NULL and non-NULL values NULL For SQL-92 compliance a JDBC technology-enabled driver will returnbeing trueNULL. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean nullsAreSortedAtEnd()

AreRetrieves whether NULL values are sorted at the end regardless of sort order. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean nullsAreSortedAtStart()

AreRetrieves whether NULL values are sorted at the start regardless of sort order. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean nullsAreSortedHigh()

AreRetrieves whether NULL values are sorted high. Sorted high means that NULL values sort higher than any other value in a domain. In an ascending order if this method returns true NULL values will appear at the end. By contrast the method nullsAreSortedAtEnd indicates whether NULL values are sorted at the end regardless of sort order. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean nullsAreSortedLow()

AreRetrieves whether NULL values are sorted low. Sorted low means that NULL values sort lower than any other value in a domain. In an ascending order if this method returns true NULL values will appear at the beginning. By contrast the method nullsAreSortedAtStart indicates whether NULL values are sorted at the beginning regardless of sort order. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean othersDeletesAreVisible(int)

IndicatesRetrieves whether deletes made by others are visible. @param resulttype setthe ResultSet type; one of iResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @return true if deletes made by others are visible for the given 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)

IndicatesRetrieves whether inserts made by others are visible. @param resulttype setthe ResultSet type; i.e.one of ResultSet.TYPE_XXX @return true if updates are visible for theFORWARD_ONLY resultResultSet.TYPE_SCROLL_INSENSITIVE setor typeResultSet.TYPE_SCROLL_SENSITIVE @return true if inserts made by others are visible for the given 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)

IndicatesRetrieves whether updates made by others are visible. @param resulttype setthe ResultSet type; one of iResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @return true if updates made by others are visible for the given 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)

IndicatesRetrieves whether a result set's own deletes are visible. @param resulttype setthe ResultSet type; one of iResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @return true if deletes are visible for the given 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)

IndicatesRetrieves whether a result set's own inserts are visible. @param resulttype setthe ResultSet type; one of iResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @return true if inserts are visible for the given 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)

IndicatesRetrieves whether afor the given type of ResultSet object the result set's own updates are visible. @param resulttype setthe ResultSet type; one iof ResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @return true if updates are visible for the given 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 storesLowerCaseIdentifiers()

Does theRetrieves whether this database treattreats mixed case unquoted SQL identifiers as case insensitive and storestores them in lower case. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean storesLowerCaseQuotedIdentifiers()

Does theRetrieves whether this database treattreats mixed case quoted SQL identifiers as case insensitive and storestores them in lower case. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean storesMixedCaseIdentifiers()

Does theRetrieves whether this database treattreats mixed case unquoted SQL identifiers as case insensitive and storestores them in mixed case. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean storesMixedCaseQuotedIdentifiers()

Does theRetrieves whether this database treattreats mixed case quoted SQL identifiers as case insensitive and storestores them in mixed case. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean storesUpperCaseIdentifiers()

Does theRetrieves whether this database treattreats mixed case unquoted SQL identifiers as case insensitive and storestores them in upper case. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean storesUpperCaseQuotedIdentifiers()

Does theRetrieves whether this database treattreats mixed case quoted SQL identifiers as case insensitive and storestores them in upper case. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsANSI92EntryLevelSQL()

IsRetrieves whether this database supports the ANSI92 entry level SQL grammar supported All JDBC CompliantTM drivers must return true. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsANSI92FullSQL()

IsRetrieves whether this database supports the ANSI92 full SQL grammar supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsANSI92IntermediateSQL()

IsRetrieves whether this database supports the ANSI92 intermediate SQL grammar supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsAlterTableWithAddColumn()

IsRetrieves "whether this database supports ALTER TABLE" with add column supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsAlterTableWithDropColumn()

IsRetrieves "whether this database supports ALTER TABLE" with drop column supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsBatchUpdates()

IndicatesRetrieves whether thethis driverdatabase supports batch updates. @return true if the driverthis database supports batch updatesupcates; false otherwise @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class DatabaseMetaData, boolean supportsCatalogsInDataManipulation()

CanRetrieves whether a catalog name can be used in a data manipulation statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsCatalogsInIndexDefinitions()

CanRetrieves whether a catalog name can be used in an index definition statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsCatalogsInPrivilegeDefinitions()

CanRetrieves whether a catalog name can be used in a privilege definition statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsCatalogsInProcedureCalls()

CanRetrieves whether a catalog name can be used in a procedure call statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsCatalogsInTableDefinitions()

CanRetrieves whether a catalog name can be used in a table definition statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsColumnAliasing()

IsRetrieves whether this database supports column aliasing supported.

If so the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as required. A JDBC CompliantTM driver always returns true. @return true if so; false otherwise @exception SQLException if a database access error occurs

Class DatabaseMetaData, boolean supportsConvert()

IsRetrieves whether this database supports the CONVERT function between SQL types supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsConvert(int, int)

IsRetrieves CONVERTwhether this database betweensupports the CONVERT for two given SQL types supported. @param fromType the type to convert from; one of the type codes from the class java.sql.Types @param toType the type to convert to; one of the type codes from the class java.sql.Types @return true if so; false otherwise @exception SQLException if a database access error occurs @see Types
Class DatabaseMetaData, boolean supportsCoreSQLGrammar()

IsRetrieves whether this database supports the ODBC Core SQL grammar supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsCorrelatedSubqueries()

AreRetrieves correlated subqueries supported Awhether JDBCthis CompliantTM driverdatabase always returns truesupports correlated subqueries. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsDataDefinitionAndDataManipulationTransactions()

AreRetrieves whether this database supports both data definition and data manipulation statements within a transaction supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsDataManipulationTransactionsOnly()

AreRetrieves whether this database supports only data manipulation statements within a transaction supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsDifferentTableCorrelationNames()

IfRetrieves whether when table correlation names are supported are they are restricted to bebeing different from the names of the tables. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsExpressionsInOrderBy()

AreRetrieves whether this database supports expressions in "ORDER BY" lists supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsExtendedSQLGrammar()

IsRetrieves whether this database supports the ODBC Extended SQL grammar supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsFullOuterJoins()

AreRetrieves whether this database supports full nested outer joins supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsGroupBy()

IsRetrieves whether this database supports some form of "GROUP BY" clause supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsGroupByBeyondSelect()

Can aRetrieves whether "GROUPthis BY"database clause addsupports using columns not included in the SELECT providedstatement in a GROUP BY clause it specifiesprovided that all of the columns in the SELECT statement are included in the GROUP BY clause. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsGroupByUnrelated()

Can aRetrieves whether "GROUPthis BY"database clausesupports using usea column that columnsis not in the SELECT statement in a GROUP BY clause. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsIntegrityEnhancementFacility()

IsRetrieves whether this database supports the SQL Integrity Enhancement Facility supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsLikeEscapeClause()

Is theRetrieves whether escape character in "LIKE" clauses supportedthis A JDBCdatabase supports CompliantTMspecifying drivera alwaysLIKE returns trueescape clause. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsLimitedOuterJoins()

Is thereRetrieves whether this database provides limited support for outer joins. (This will be true if supportFullOuterJoinsthe method issupportsFullOuterJoins returns true.). @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsMinimumSQLGrammar()

IsRetrieves whether this database supports the ODBC Minimum SQL grammar supported All JDBC CompliantTM drivers must return true. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsMixedCaseIdentifiers()

Does theRetrieves whether this database treattreats mixed case unquoted SQL identifiers as case sensitive and as a result storestores them in mixed case A JDBC CompliantTM driver will always return false. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsMixedCaseQuotedIdentifiers()

Does theRetrieves whether this database treattreats mixed case quoted SQL identifiers as case sensitive and as a result storestores them in mixed case A JDBC CompliantTM driver will always return true. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsMultipleResultSets()

AreRetrieves whether this database supports getting multiple ResultSet objects from a single executecall to the method supportedexecute. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsMultipleTransactions()

Can we haveRetrieves whether this database allows having multiple transactions open at once (on different connections). @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsNonNullableColumns()

CanRetrieves whether columns in this database may be defined as non-nullable A JDBC CompliantTM driver always returns true. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsOpenCursorsAcrossCommit()

Can cursorsRetrieves whether remainthis database supports keeping cursors open across commits. @return true if cursors always remain open; false if they might not remain open @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsOpenCursorsAcrossRollback()

Can cursorsRetrieves whether remainthis database supports keeping cursors open across rollbacks. @return true if cursors always remain open; false if they might not remain open @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsOpenStatementsAcrossCommit()

Can statementsRetrieves whether remainthis database supports keeping statements open across commits. @return true if statements always remain open; false if they might not remain open @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsOpenStatementsAcrossRollback()

Can statementsRetrieves whether remainthis database supports keeping statements open across rollbacks. @return true if statements always remain open; false if they might not remain open @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsOrderByUnrelated()

Can anRetrieves whether "ORDERthis BY"database clausesupports using usea column that columnsis not in the SELECT statement in an ORDER BY clause. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsOuterJoins()

IsRetrieves whether this database supports some form of outer join supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsPositionedDelete()

IsRetrieves whether this database supports positioned DELETE supportedstatements. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsPositionedUpdate()

IsRetrieves whether this database supports positioned UPDATE supportedstatements. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsResultSetConcurrency(int, int)

DoesRetrieves thewhether this database supportsupports the given 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)

DoesRetrieves thewhether this database supportsupports 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 supportsSchemasInDataManipulation()

CanRetrieves whether a schema name can be used in a data manipulation statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSchemasInIndexDefinitions()

CanRetrieves whether a schema name can be used in an index definition statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSchemasInPrivilegeDefinitions()

CanRetrieves whether a schema name can be used in a privilege definition statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSchemasInProcedureCalls()

CanRetrieves whether a schema name can be used in a procedure call statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSchemasInTableDefinitions()

CanRetrieves whether a schema name can be used in a table definition statement. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSelectForUpdate()

IsRetrieves whether this database supports SELECT forFOR UPDATE supportedstatements. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsStoredProcedures()

AreRetrieves whether this database supports stored procedure calls usingthat use the stored procedure escape syntax supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSubqueriesInComparisons()

AreRetrieves subqueries in comparison expressionswhether supportedthis A JDBCdatabase CompliantTMsupports driver always returns truesubqueries in comparison expressions. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSubqueriesInExists()

AreRetrieves subqueries in 'exists' expressions supportedwhether A JDBCthis database CompliantTMsupports driver alwayssubqueries in returnsEXISTS trueexpressions. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSubqueriesInIns()

AreRetrieves subqueries in 'in' statements supportedwhether A JDBCthis database CompliantTMsupports driver alwayssubqueries in returnsIN truestatements. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsSubqueriesInQuantifieds()

AreRetrieves subqueries in quantified expressionswhether supportedthis A JDBCdatabase CompliantTMsupports driver always returns truesubqueries in quantified expressions. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsTableCorrelationNames()

AreRetrieves table correlation names supportedwhether Athis JDBC CompliantTMdatabase driver always returns truesupports table correlation names. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsTransactionIsolationLevel(int)

DoesRetrieves whether this database supportsupports the given transaction isolation level. @param level one of the valuestransaction isolation arelevels defined in java.sql.Connection @return true if so; false otherwise @exception SQLException if a database access error occurs @see Connection
Class DatabaseMetaData, boolean supportsTransactions()

Are transactionsRetrieves whether supportedthis database supports transactions. If not invoking the method commit is a noop and the isolation level is TRANSACTION_NONE. @return true if transactions are supported; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsUnion()

IsRetrieves whether this database supports SQL UNION supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean supportsUnionAll()

IsRetrieves whether this database supports SQL UNION ALL supported. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean updatesAreDetected(int)

IndicatesRetrieves whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated. @param resulttype setthe ResultSet type; one of iResultSet.eTYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_XXXSCROLL_SENSITIVE @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 DatabaseMetaData, boolean usesLocalFilePerTable()

Does theRetrieves whether this database useuses a file for each table. @return true if thethis database uses a local file for each table; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, boolean usesLocalFiles()

Does theRetrieves whether this database storestores tables in a local file. @return true if so; false otherwise @exception SQLException if a database access error occurs
Class DatabaseMetaData, int bestRowNotPseudo

Indicates that the best row identifier is NOT a pseudo column.

A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getBestRowIdentifier.

Class DatabaseMetaData, int bestRowPseudo

Indicates that the best row identifier is a pseudo column.

A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getBestRowIdentifier.

Class DatabaseMetaData, int bestRowSession

Indicates that the scope of the best row identifier is the remainder of the current session.

A possible value for the column SCOPE in the ResultSet object returned by the method getBestRowIdentifier.

Class DatabaseMetaData, int bestRowTemporary

Indicates that the scope of the best row identifier is very temporary lasting only while the row is being used.

A possible value for the column SCOPE in the ResultSet object returned by the method getBestRowIdentifier.

Class DatabaseMetaData, int bestRowTransaction

Indicates that the scope of the best row identifier is the remainder of the current transaction.

A possible value for the column SCOPE in the ResultSet object returned by the method getBestRowIdentifier.

Class DatabaseMetaData, int bestRowUnknown

Indicates that the best row identifier may or may not be a pseudo column.

A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getBestRowIdentifier.

Class DatabaseMetaData, int columnNoNulls

Indicates that the column might not allow NULL values.

A possible value for the column NULLABLE in the ResultSet returned by the method getColumns.

Class DatabaseMetaData, int columnNullable

Indicates that the column definitely allows NULL values.

A possible value for the column NULLABLE in the ResultSet returned by the method getColumns.

Class DatabaseMetaData, int columnNullableUnknown

Indicates that the nullability of columns is unknown.

A possible value for the column NULLABLE in the ResultSet returned by the method getColumns.

Class DatabaseMetaData, int importedKeyCascade

A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys getExportedKeys and getCrossReference. For the column UPDATE_RULE it indicates that when the primary key is updated the foreign key (imported key) is changed to agree with it. For the column DELETE_RULE it indicates that when the primary key is deleted rows that imported that key are deleted.

A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys getExportedKeys and getCrossReference.

Class DatabaseMetaData, int importedKeyInitiallyDeferred

Indicates deferrability. See SQL-92 for a definition.

A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys getExportedKeys and getCrossReference. Indicates deferrability. See SQL-92 for a definition.

Class DatabaseMetaData, int importedKeyInitiallyImmediate

Indicates deferrability. See SQL-92 for a definition.

A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys getExportedKeys and getCrossReference. Indicates deferrability. See SQL-92 for a definition.

Class DatabaseMetaData, int importedKeyNoAction

A possible value forFor the columns UPDATE_RULE and DELETE_RULE inindicates that if the ResultSetprimary objects returned by the methodskey has been imported it getImportedKeyscannot getExportedKeysbe andupdated getCrossReferenceor deleted.

For A possible value for the columns UPDATE_RULE and DELETE_RULE it indicates that ifin the primary keyResultSet has been imported it cannotobjects returned by the methods begetImportedKeys updatedgetExportedKeys orand deletedgetCrossReference.

Class DatabaseMetaData, int importedKeyNotDeferrable

Indicates deferrability. See SQL-92 for a definition.

A possible value for the column DEFERRABILITY in the ResultSet objects returned by the methods getImportedKeys getExportedKeys and getCrossReference. Indicates deferrability. See SQL-92 for a definition.

Class DatabaseMetaData, int importedKeyRestrict

A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys getExportedKeys and getCrossReference. For the column UPDATE_RULE it indicates that a primary key may not be updated if it has been imported by another table as a foreign key. For the column DELETE_RULE it indicates that a primary key may not be deleted if it has been imported by another table as a foreign key.

A possible value for the columns UPDATE_RULE and DELETE_RULE in the ResultSet objects returned by the methods getImportedKeys getExportedKeys and getCrossReference.

Class DatabaseMetaData, int importedKeySetDefault

A possible value forFor the columns UPDATE_RULE and DELETE_RULE inindicates that if the ResultSetprimary objects returnedkey is byupdated or deleted the methodsforeign getImportedKeyskey getExportedKeys(imported andkey) getCrossReferenceis set to the default value.

For A possible value for the columns UPDATE_RULE and DELETE_RULE it indicates that ifin the primary key isResultSet updated or deletedobjects returned by the foreign key (imported key) is setmethods togetImportedKeys thegetExportedKeys defaultand valuegetCrossReference.

Class DatabaseMetaData, int importedKeySetNull

A possible value forFor the columns UPDATE_RULE and DELETE_RULE inindicates that when the ResultSetprimary objects returnedkey is byupdated or deleted the methodsforeign getImportedKeyskey getExportedKeys(imported andkey) is changed to getCrossReferenceNULL.

For A possible value for the columns UPDATE_RULE and DELETE_RULE it indicates that whenin the primary key isResultSet updated or deletedobjects returned by the foreign key (imported key)methods isgetImportedKeys changedgetExportedKeys toand NULLgetCrossReference.

Class DatabaseMetaData, int procedureColumnIn

Indicates that the column stores IN parameters.

A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureColumnInOut

Indicates that the column stores INOUT parameters.

A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureColumnOut

Indicates that the column stores OUT parameters.

A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureColumnResult

Indicates that the column stores results.

A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureColumnReturn

Indicates that the column stores return values.

A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureColumnUnknown

Indicates that type of the column is unknown.

A possible value for the column COLUMN_TYPE in the ResultSet returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureNoNulls

Indicates that NULL values are not allowed.

A possible value for the column NULLABLE in the ResultSet object returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureNoResult

Indicates that the procedure does not return a result.

A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures. Indicates that the procedure does not return a result.

Class DatabaseMetaData, int procedureNullable

Indicates that NULL values are allowed.

A possible value for the column NULLABLE in the ResultSet object returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureNullableUnknown

Indicates that whether NULL values are allowed is unknown.

A possible value for the column NULLABLE in the ResultSet object returned by the method getProcedureColumns.

Class DatabaseMetaData, int procedureResultUnknown

Indicates that it is not known whether the procedure returns a result.

A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures. Indicates that it is not known whether the procedure returns a result.

Class DatabaseMetaData, int procedureReturnsResult

Indicates that the procedure returns a result.

A possible value for column PROCEDURE_TYPE in the ResultSet object returned by the method getProcedures. Indicates that the procedure returns a result.

Class DatabaseMetaData, short tableIndexClustered

Indicates that this table index is a clustered index.

A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo. Indicates that this table index is a clustered index.

Class DatabaseMetaData, short tableIndexHashed

Indicates that this table index is a hashed index.

A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo. Indicates that this table index is a hashed index.

Class DatabaseMetaData, short tableIndexOther

A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo. Indicates that this table index is not a clustered index a hashed index or table statistics; it is something other than these.

A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.

Class DatabaseMetaData, short tableIndexStatistic

A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo. Indicates that this column contains table statistics that are returned in conjunction with a table's index descriptions.

A possible value for column TYPE in the ResultSet object returned by the method getIndexInfo.

Class DatabaseMetaData, int typeNoNulls

Indicates that a NULL value is NOT allowed for this data type.

A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo. Indicates that a NULL value is NOT allowed for this data type.

Class DatabaseMetaData, int typeNullable

Indicates that a NULL value is allowed for this data type.

A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo. Indicates that a NULL value is allowed for this data type.

Class DatabaseMetaData, int typeNullableUnknown

Indicates that it is not known whether a NULL value is allowed for this data type.

A possible value for column NULLABLE in the ResultSet object returned by the method getTypeInfo. Indicates that it is not known whether a NULL value is allowed for this data type.

Class DatabaseMetaData, int typePredBasic

A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo. Indicates that one can base all WHERE search clauses except WHERE . . . LIKE on this data type.

A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.

Class DatabaseMetaData, int typePredChar

A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo. Indicates that the only WHERE search clause that can be based on this type is WHERE . . . LIKE.

A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo.

Class DatabaseMetaData, int typePredNone

Indicates that WHERE search clauses are not supported for this type.

A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo. Indicates that WHERE search clauses are not supported for this type.

Class DatabaseMetaData, int typeSearchable

Indicates that all WHERE search clauses can be based on this type.

A possible value for column SEARCHABLE in the ResultSet object returned by the method getTypeInfo. Indicates that all WHERE search clauses can be based on this type.

Class DatabaseMetaData, int versionColumnNotPseudo

Indicates that this version column is NOT a pseudo column.

A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getVersionColumns.

Class DatabaseMetaData, int versionColumnPseudo

Indicates that this version column is a pseudo column.

A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getVersionColumns.

Class DatabaseMetaData, int versionColumnUnknown

Indicates that this version column may or may not be a pseudo column.

A possible value for the column PSEUDO_COLUMN in the ResultSet object returned by the method getVersionColumns.


Class Date

A thin wrapper around a millisecond value that allows JDBC to identify this as aan SQL DATE value. A milliseconds value represents the number of milliseconds that have passed since January 1 1970 00:00:00.000 GMT.

To conform with the definition of SQL DATE the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours minutes seconds and milliseconds to zero in the particular time zone with which the instance is associated.

Class Date, constructor Date(int, int, int)

Constructs a Date object initialized with the given year month and day.

The result is undefined if a given argument is out of bounds. @param year the year- minus 1900; must be 0 to 8099. (Note that 8099 is 9999 minus 1900.) @param month 0 to 11 @param day 1 to 31 @deprecated instead use the constructor Date(long date)

Class Date, constructor Date(long)

Constructs a Date object using athe given milliseconds time value. If the given millisecondmilliseconds value contains time information the driver will set the time components to the time in the default time zone (the time zone of the Java virtual machine running the application) that corresponds to zero GMT. @param date milliseconds since January 1 1970 00:00:00 GMT not to exceed the milliseconds representation for the year 8099. A negative number indicates the number of milliseconds before January 1 1970 00:00:00 GMT.
Class Date, int getHours()

This method is deprecated and should not be used because SQL Date values do not have a time component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked @see #setHours
Class Date, int getMinutes()

This method is deprecated and should not be used because SQL Date values do not have a time component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked @see #setMinutes
Class Date, int getSeconds()

This method is deprecated and should not be used because SQL Date values do not have a time component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked @see #setSeconds
Class Date, void setHours(int)

This method is deprecated and should not be used because SQL Date values do not have a time component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked @see #getHours
Class Date, void setMinutes(int)

This method is deprecated and should not be used because SQL Date values do not have a time component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked @see #getMinutes
Class Date, void setSeconds(int)

This method is deprecated and should not be used because SQL Date values do not have a time component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked @see #getSeconds
Class Date, void setTime(long)

Sets an existing Date object using the given milliseconds time value. If the given milliseconds value contains time information the driver will set the time components to the time in the default time zone (the time zone of the Java virtual machine running the application) that corresponds to zero GMT. @param date milliseconds since January 1 1970 00:00:00 GMT not to exceed the milliseconds representation for the year 8099. A negative number indicates the number of milliseconds before January 1 1970 00:00:00 GMT.
Class Date, Date valueOf(String)

Converts a string in JDBC date escape format to a Date value. @param s date in format "yyyy-mm-dd" @return a java.sql.Date object representing the given date

Class Driver, boolean acceptsURL(String)

ReturnsRetrieves true ifwhether the driver thinks that it can open a connection to the given URL. Typically drivers will return true if they understand the subprotocol specified in the URL and false if they don'tdo not. @param url the URL of the database @return true if this driver can connectunderstands to the given URL; false otherwise @exception SQLException if a database access error occurs
Class Driver, Connection connect(String, Properties)

Attempts to make a database connection to the given URL. The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL. This will be common as when the JDBC driver manager is asked to connect to a given URL it passes the URL to each loaded driver in turn.

The driver should raise athrow an SQLException if it is the right driver to connect to the given URL but has trouble connecting to the database.

The java.util.Properties argument can be used to passedpass arbitrary string tag/value pairs as connection arguments. Normally at least "user" and "password" properties should be included in the Properties object. @param url the URL of the database to which to connect @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 object that represents a connection to the URL @exception SQLException if a database access error occurs

Class Driver, int getMajorVersion()

GetsRetrieves the driver's major version number. Initially this should be 1. @return this driver's major version number
Class Driver, DriverPropertyInfo[] getPropertyInfo(String, Properties)

Gets information about the possible properties for this driver.

The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far additional values may become necessary so it may be necessary to iterate though several calls to the getPropertyInfo method. @param url the URL of the database to which to connect @param info a proposed list of tag/value pairs that will be sent on connect open @return an array of DriverPropertyInfo objects describing possible properties. This array may be an empty array if no properties are required. @exception SQLException if a database access error occurs

Class Driver, boolean jdbcCompliant()

Reports whether this driver is a genuine JDBC COMPLIANTCompliantTM driver. A driver may only report true here if it passes the JDBC compliance tests; otherwise it is required to return false.

JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level. It is expected that JDBC compliant drivers will be available for all the major commercial databases.

This method is not intended to encourage the development of non-JDBC compliant drivers but is a recognition of the fact that some vendors are interested in using the JDBC API and framework for lightweight databases that do not support full database functionality or for special databases such as document information retrieval where a SQL implementation may not be feasible. @return true if this driver is JDBC Compliant; false otherwise


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 Driverdriver from the DriverManager's list. Applets can only deregister Driversdrivers from their own classloaders. @param driver the JDBC Driver to drop @exception SQLException if a database access error occurs
Class DriverManager, PrintStream getLogStream()

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

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

Gets the maximum time in seconds that a driver can wait when attempting to log in to a database. @return the driver login time limit in seconds @see #setLoginTimeout
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 @see #getLogStream

Class DriverManager, void setLogWriter(PrintWriter)

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

There is a minor versioning problem created 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. As 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 logging and tracing @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#getLogWriter @since 1.2

Class DriverManager, void setLoginTimeout(int)

Sets the maximum time in seconds that a driver will wait while attempting to connect to a database. @param seconds the login time limit in seconds @see #getLoginTimeout

Class PreparedStatement

An object that represents a precompiled SQL statement.

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

Note: The setXXXsetter methods (setShort setString and so on) 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 IntegerINTEGER 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.

In the following Exampleexample of setting a parameter; con isrepresents 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()

Adds a set of parameters to this 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, boolean execute()

Executes the SQL statement in this PreparedStatement object which may be 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.

The execute method returns a boolean to indicate the form of the first result. You must call either the method getResultSet or getUpdateCount to retrieve the result; you must call getMoreResults to move to any subsequent result(s). @return true if the first result is a ResultSet object; false if the first result is an update count or there is no result @exception SQLException if a database access error occurs or an argument is supplied to this method @see Statement#execute @see Statement#getResultSet @see Statement#getUpdateCount @see Statement#getMoreResults

Class PreparedStatement, ResultSet executeQuery()

Executes the SQL query in this PreparedStatement object and returns the resultResultSet setobject 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 or the SQL statement does not return a ResultSet object
Class PreparedStatement, int executeUpdate()

Executes the SQL INSERT UPDATE or DELETE statement in this PreparedStatement object. In additionwhich must be an SQL statementsINSERT UPDATE or DELETE statement; or an SQL statement that returnreturns nothing such as SQLa DDL statements can be executedstatement. @return either (1) the row count for INSERT UPDATE or DELETE statements; or (2) 0 for SQL statements that return nothing @exception SQLException if a database access error occurs or the SQL statement returns a ResultSet object
Class PreparedStatement, ResultSetMetaData getMetaData()

Gets theRetrieves a numberResultSetMetaData typesobject andthat contains information about the propertiescolumns of the ResultSet object that will be returned when this PreparedStatement object is executed.

Because a PreparedStatement object is precompiled it is possible to know about the ResultSet object's columnsthat it will return without having to execute it. Consequently it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it and then invoking the ResultSet.getMetaData method on the ResultSet object that is returned.

NOTE: Using this method may be expensive for some drivers due to the lack of underlying DBMS support. @return the description of a ResultSet object's columns or null if the driver cannot return a ResultSetMetaData object @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)

Sets the designated parameter to the given Array object. SetsThe driver converts this to an ArraySQL parameterARRAY value when it sends it to the database. @param i the first parameter is 1 the second is 2 ... @param x an Array object that maps an SQL ARRAY value @exception SQLException if a database access error occurs @since 1.2 @see What Is in the JDBC 2.0 API
Class PreparedStatement, void setBigDecimal(int, BigDecimal)

Sets the designated parameter to athe given java.math.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 setBlob(int, Blob)

Sets the designated parameter to the given Blob object. The driver converts this to an SQL BLOB value when it sends it to the database. @param i the first parameter is 1 the second is 2 ... @param x a Blob object that maps 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 athe given 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 athe given 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 athe given 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 VARBINARY 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)

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. The data will be read from the stream as needed until 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 xreader the java.io.Reader reader whichobject that contains the UNICODEUnicode 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)

Sets the designated parameter to the given Clob object. The driver converts this to an SQL CLOB value when it sends it to the database. @param i the first parameter is 1 the second is 2 ... @param x a Clob object that maps 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 athe given 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)

Sets the designated parameter to the 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. If no Calendar object is specified the driver uses the default timezone which is that of the virtual machine running the application. @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 athe given 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 athe given 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 athe given 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 athe given 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, String)

Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined 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-defined 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-defined 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-defined or REF type the given typeName is ignored. @param parameterIndexparamIndex 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-defined type; ignored if the parameter is not a user-defined 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 the designated parameter using the given object. The second parameter must be of type Object; therefore the java.lang equivalent objects should be used for built-in types.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument 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 driver-specific Java type. If the object is of a class implementing the interface SQLData the JDBC driver should call the 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 the 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 or the type of the given object is ambiguous

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

Sets the value of the designated parameter with 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 the 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 datatabasedatabase- 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)

Sets the designated parameter to the given REF(<structured-type>) value. The driver converts this to an SQL REF value when it sends it to the database. @param i the first parameter is 1 the second is 2 ... @param x an SQL REF value @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 athe given 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 athe given 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 VARCHAR 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 athe given 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)

Sets the designated parameter to the 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. If no Calendar object is specified the driver uses the default timezone which is that of the virtual machine running the application. @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 athe given 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)

Sets the designated parameter to the 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. If no Calendar object is specified the driver uses the default timezone which is that of the virtual machine running the application. @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. A Unicode character has two bytes with the first byte being the high byte and the second being the low byte. When a very large UNICODEUnicode value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODEUnicode 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 thea java input.io.InputStream stream whichobject that contains the UNICODEUnicode parameter value as two-byte Unicode characters @param length the number of bytes in the stream @exception SQLException if a database access error occurs @deprecated


Class Ref

The mapping in 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 usedeither 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. 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 and is dereferenced by passing it as a parameter to an SQL statement andstored executingin the statement. The Ref interface is newdatabase inusing the JDBC 2PreparedStatement.0setRef APImethod. @see Struct @since 1.2

Class Ref, String getBaseTypeName()

Retrieves the fully-qualified SQL name of the SQL structured type that this Ref object references. @return the fully-qualified SQL name of the referenced 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 table of data representing a database result set which is usually generated by executing a statement 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 possibleyou tocan iterate through it only once and only from the first row to the last row. New methods in the JDBC 2.0 API makeIt itis 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 getter methods (getXXXgetBoolean methodsgetLong and so on) for retrieving column values from the current row. Values can be 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 result set columns within each row should be read in left-to-right order and each column should be read only once.

For the getXXXgetter methods a JDBC driver attempts to convert the underlying data to the Java type specified in the XXX part of the getXXXgetter method and returns a suitable Java value. The JDBC specification has a table showing the allowable mappings from SQL types to Java types withthat can be used by the ResultSet.getXXX getter methods.

Column names used as input to getXXXgetter methods are case insensitive. When a getXXXgetter method is called with a column name and several columns have the same name 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 updateXXXupdater 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 getXXXgetter methods also apply to parameters to the updateXXXupdater methods.

The updateXXXupdater 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 when the Statement object that generated it 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)

Moves the cursor to the given row number in this ResultSet object.

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) moves 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 the first row or after the last row.

Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last(). @param row the number of the row to which the cursor should move. A positive number indicates the row number counting from the beginning of the result set; a negative number indicates the row number counting from the end of the result set @return true if the cursor is on the result set; false otherwise @exception SQLException if a database access error occurs the 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()

Moves the cursor to the end of this ResultSet object just after the last row. This 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()

Moves the cursor to the front of this ResultSet object just before the first row. This 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()

Cancels the updates made to the current row in this ResultSet object. This method may be called after calling an updateXXXupdater method(s) and before calling the method updateRow to roll back the updates made to a row. If no updates have been made or updateRow has already been called 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 deleteRow()

Deletes the current row from this ResultSet object and from the underlying database. This 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 ResultSet 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 the ResultSet object does not contain columnName or a database access error occurs
Class ResultSet, boolean first()

Moves the cursor to the first row in this ResultSet object. @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)

ReturnsRetrieves the value 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, Array getArray(int)

ReturnsRetrieves the value 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, InputStream getAsciiStream(String)

GetsRetrieves the value of the 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 getXXXgetter 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 the value returned is null. @exception SQLException if a database access error occurs

Class ResultSet, InputStream getAsciiStream(int)

GetsRetrieves the value of the 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 getXXXgetter 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; if the value is SQL NULL the value returned is null @exception SQLException if a database access error occurs

Class ResultSet, BigDecimal getBigDecimal(String)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision. @param columnName the column name @return the column value (full precision); if the value is SQL NULL the value 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)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal in 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 value returned is null @exception SQLException if a database access error occurs @deprecated
Class ResultSet, BigDecimal getBigDecimal(int)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal 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 value 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)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a java.sql.BigDecimal in 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 value returned is null @exception SQLException if a database access error occurs @deprecated
Class ResultSet, InputStream getBinaryStream(String)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a 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 getXXXgetter 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 the value is SQL NULL the result is null @exception SQLException if a database access error occurs

Class ResultSet, InputStream getBinaryStream(int)

GetsRetrieves 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 getXXXgetter 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 the value is SQL NULL the value returned is null @exception SQLException if a database access error occurs

Class ResultSet, Blob getBlob(String)

ReturnsRetrieves the value of the designated 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, Blob getBlob(int)

ReturnsRetrieves the value of the designated 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, boolean getBoolean(String)

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a boolean 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 value returned is false @exception SQLException if a database access error occurs
Class ResultSet, byte getByte(String)

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a byte 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 value returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, byte[] getBytes(String)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, byte[] getBytes(int)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Reader getCharacterStream(String)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object. @param columnName the name of the column @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 @returnexception the value inSQLException the specified column as aif a database access error java.io.Readeroccurs @since 1.2 @see What Is in the JDBC 2.0 API
Class ResultSet, Reader getCharacterStream(int)

GetsRetrieves the value of the 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 ... @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, Clob getClob(String)

ReturnsRetrieves the value of the designated 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, Clob getClob(int)

ReturnsRetrieves the value of the designated 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, int getConcurrency()

ReturnsRetrieves the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set. @return the concurrency type either ResultSet.CONCUR_READ_ONLY or ResultSet.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()

GetsRetrieves 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 selectSELECT statement should be of the form 'selectSELECT forFOR update'UPDATE. If the 'for update'FOR clauseUPDATE 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 cursor @exception SQLException if a database access error occurs

Class ResultSet, Date getDate(String)

GetsRetrieves the value of the 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Date getDate(String, Calendar)

ReturnsRetrieves the value of the 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 date 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 java.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 value 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)

GetsRetrieves the value of the 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Date getDate(int, Calendar)

ReturnsRetrieves the value of the 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 date if the underlying database does not store timezone information. @param columnIndex the first column is 1 the second is 2 ... @param cal the java.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 value 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)

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a double 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 value returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, int getFetchDirection()

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

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

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a float 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 value returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, int getInt(String)

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as an int 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 value returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, long getLong(String)

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a long 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 value returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, Object getObject(String)

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming 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 specification. If the value is an SQL NULL the driver returns a Java null.

This method may also be used to read datatabase-specific abstract data types.

In the JDBC 2.0 API the behavior of the method getObject is extended to materialize data of SQL user-defined types. When 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)

ReturnsRetrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL the driver returns a Java null. 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 programming language @return an Object representing the SQL value in the specified column @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, Object getObject(int)

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming 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 specification. If the value is an SQL NULL the driver returns a Java null.

This method may also be used to read datatabase-specific abstract data types. In the JDBC 2.0 API the behavior of method getObject is extended to materialize data of SQL user-defined types. When 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)

ReturnsRetrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL the driver returns a Java null. 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 programming language @return an Object in the Java programming language representing the SQL value @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, Ref getRef(String)

ReturnsRetrieves the value of the designated 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, Ref getRef(int)

ReturnsRetrieves the value of the designated 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class ResultSet, int getRow()

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)

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a short 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 value returned is 0 @exception SQLException if a database access error occurs
Class ResultSet, Statement getStatement()

ReturnsRetrieves 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 this ResultSet object 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)

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

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a String 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Time getTime(String)

GetsRetrieves the value of the 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Time getTime(String, Calendar)

ReturnsRetrieves the value of the 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 time 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 value 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)

GetsRetrieves the value of the 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Time getTime(int, Calendar)

ReturnsRetrieves the value of the 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 time if the underlying database does not store timezone information. @param columnIndex the first column is 1 the second is 2 ... @param cal the java.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 value 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)

GetsRetrieves the value of the 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Timestamp getTimestamp(String, Calendar)

ReturnsRetrieves the value of the 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 timestamp 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 date @return the column value as a java.sql.Timestamp object; if the value is SQL NULL the value 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)

GetsRetrieves the value of the 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 value returned is null @exception SQLException if a database access error occurs
Class ResultSet, Timestamp getTimestamp(int, Calendar)

ReturnsRetrieves the value of the 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 timestamp if the underlying database does not store timezone information. @param columnIndex the first column is 1 the second is 2 ... @param cal the java.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 value 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()

ReturnsRetrieves the type of this ResultSet object. The type is determined by the Statement object that created the result set. @return ResultSet.TYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.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)

GetsRetrieves the value of the designated column in the current row of this ResultSet object as a stream of two-byte Unicode characters. The first byte is the high byte; the second byte is the low byte. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC technology-enabled 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 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 getXXXgetter 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 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 the value returned is null. @exception SQLException if a database access error occurs @deprecated use getCharacterStream instead

Class ResultSet, InputStream getUnicodeStream(int)

GetsRetrieves 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 two-byte Unicode characters. The first byte is the high byte; the second byte is the low byte. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHARvalues. 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 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 getXXXgetter 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 in Javaof UTFtwo-8 byte formatUnicode characters; if the value is SQL NULL the value returned is null @exception SQLException if a database access error occurs @deprecated use getCharacterStream in place of getUnicodeStream

Class ResultSet, SQLWarning getWarnings()

ReturnsRetrieves the first warning reported by calls on this ResultSet object. Subsequent warnings on this ResultSet object will be chained to the SQLWarning object that this method returns.

The warning chain is automatically cleared each time a new row is read. This method may not be called on a ResultSet object that has been closed; doing so will cause an SQLException to be thrown.

Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by Statement methods (such as reading OUT parameters) will be chained on the Statement object. @return the first SQLWarning object reported or null if there are none @exception SQLException if a database access error occurs or this method is called on a closed result set

Class ResultSet, void insertRow()

Inserts the contents of the insert row into this ResultSet objaectobject and into the database. The 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()

IndicatesRetrieves whether the cursor is after the last row in this ResultSet object. @return true if the cursor is after the last row; false if the cursor is at 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()

IndicatesRetrieves whether the cursor is before the first row in this ResultSet object. @return true if the cursor is before the first row; false if the cursor is at 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()

IndicatesRetrieves whether the cursor is on the first row of this ResultSet object. @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()

IndicatesRetrieves whether the cursor is on the last row of this ResultSet object. 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()

Moves the cursor to the last row in this ResultSet object. @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()

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()

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 updateXXXupdater methods prior to inserting the row into the result set. Only the updateXXXupdater getXXXgetter 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. An updateXXXupdater method must be called before a getXXXgetter 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 previous()

Moves the cursor to the previous row in this ResultSet object. 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()

Refreshes the current row with its most recent value in the database. This 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 updateXXXupdater 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)

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 fromidentical to calling the method next() because is makesand sense to callcalling the method nextrelative(-1) when there is no currentis identical to calling the rowmethod previous(). @param rows foran exampleint whenspecifying the cursornumber is positionedof rows beforeto move from the firstcurrent row; ora afterpositive number moves the lastcursor rowforward; ofa negative number moves the resultcursor set.backward @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()

IndicatesRetrieves 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 this ResultSet object 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()

IndicatesRetrieves whether the current row has had an insertion. The value returned depends on whether or not this ResultSet object 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()

IndicatesRetrieves whether the current row has been updated. The value returned depends on whether or not the result set can detect updates. @return true if both (1) the row has been visibly updated by the owner or another and (2) 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)

Gives a hint as to the direction in which the rows in this ResultSet object will be processed. The initial value is determined by the Statement object that produced this ResultSet object. The fetch direction may be changed at any time. @param direction an int specifying the suggested fetch direction; one of ResultSet.FETCH_FORWARD ResultSet.FETCH_REVERSE or ResultSet.FETCH_UNKNOWN @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 APIStatement#setFetchDirection @see Statement#setFetchDirectiongetFetchDirection
Class ResultSet, void setFetchSize(int)

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 ResultSet object. 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 Statement 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#getFetchSize
Class ResultSet, void updateAsciiStream(String, InputStream, int)

Updates the designated column with an ascii stream value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with an ascii stream value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.sql.BigDecimal value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.math.BigDecimal value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a binary stream value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a binary stream value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a boolean value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a boolean value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a byte value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a byte value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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 updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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[])

Updates the designated column with a byte array value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a character stream value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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 xreader the java.io.Reader object containing 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)

Updates the designated column with a character stream value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.sql.Date value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.sql.Date value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a double value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a double value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a float value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a float value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with an int value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with an int value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a long value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a long value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a null value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Gives a nullable column a null value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with an Object value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with an Object value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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 for java.sql.Types.DECIMADECIMAL 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)

Updates the designated column with an Object value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with an Object value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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 for java.sql.Types.DECIMA 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()

Updates the underlying database with the new contents of the current row of this ResultSet object. This 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)

Updates the designated column with a short value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a short value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a String value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a String value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.sql.Time value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.sql.Time value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.sql.Timestamp value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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)

Updates the designated column with a java.sql.Timestamp value. The updateXXXupdater methods are used to update column values in the current row or the insert row. The updateXXXupdater 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 getXXXgetter 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

The constant indicating 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

The constant indicating 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

The constant indicating 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

The constant indicating 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 TYPE_FORWARD_ONLY

The constant indicating 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

The constant indicating 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

The constant indicating 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, String getCatalogName(int)

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

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. @param column the first column is 1 the second is 2 ... @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 SQLData

The interface used for the custom mapping of an SQL user-defined typestype (UDT) to a class in the Java programming language. ThisThe class object for a class implementing the SQLData interface mustwill be implementedentered by any Javain the appropriate classConnection object's thattype map along with the SQL name of the UDT for which it is registereda incustom mapping.

Typically a SQLData implementation will define a field for each attribute of an SQL structured type mappingor a single field for an SQL DISTINCT type. When the UDT is retrieved from a data source with the ResultSet.getObject method it will be mapped as an instance of this class. A programmer can operate on this class instance just as on any other object in the Java programming language and then store any changes made to it by calling the PreparedStatement.setObject method which will map it back to the SQL type.

It is expected that this interface willthe implementation of normallythe class for a custom mapping will be implementeddone by a tool. In a typical implementation the programmer would simply supply the name of the SQL UDT the name of the class to which it is being mapped and the names of the fields to which each of the attributes of the UDT is to be mapped. The methodstool inwill use this interface are calledinformation to implement bythe SQLData.readSQL and SQLData.writeSQL methods. The readSQL method calls the driverappropriate SQLInput methods to read each attribute from an SQLInput object and arethe neverwriteSQL called bymethod calls aSQLOutput programmermethods directly.to @sincewrite 1each attribute back to the data source via an SQLOutput object.2 @see

WhatAn Isapplication inprogrammer will not normally call SQLData methods directly and the JDBCSQLInput 2and SQLOutput methods are called internally by SQLData methods not by application code.0 @since API1.2

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. @return 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 reader method on the stream. @param stream the SQLInput object from which to read the data for the value that is being custom mapped @param typeName 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 writer method(s) (writeInt writeString and so on) 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 SQLOutput object to which to write the data for 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; the reason field defaults to null the SQLState field defaults to null and the vendorCode field defaults to 0.
Class SQLException, constructor SQLException(String)

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

Constructs an SQLException object with athe given reason and SQLState; the vendorCode field defaults to 0. @param reason a description of the exception @param SQLState an XOPEN or SQL 99 code identifying the exception
Class SQLException, constructor SQLException(String, String, int)

Constructs a fully-specified SQLException object. @param reason a description of the exception @param SQLState an XOPEN or SQL 99 code identifying the exception @param vendorCode a database vendor-specific exception code
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 @see #setNextException
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 @see #getNextException

Class SQLInput

An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL 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 reader methods (readXXXreadLong methodsreadBytes and so on) 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 reader 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, InputStream readAsciiStream()

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

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

ReturnsReads the next attribute in the stream and returns it as a stream of uninterpreted bytes. @return the attribute; if the value is SQL NULL returns null @exception SQLException if a database access error occurs
Class SQLInput, boolean readBoolean()

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

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

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

ReturnsReads the next attribute in the stream and returns it as a stream of Unicode characters. @return the attribute; if the value is SQL NULL returns null @exception SQLException if a database access error occurs
Class SQLInput, Date readDate()

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

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

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

Reads the next attribute in the stream and returns it as an int in the Java programming language. @return the attribute; if the value is SQL NULL returns 0 @exception SQLException if a database access error occurs
Class SQLInput, long readLong()

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

ReturnsReads the datum at the head of the stream and returns it as an Object in the Java programming 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 an Object in the Java programming language;null if the datum is SQL NULL @exception SQLException if a database access error occurs

Class SQLInput, short readShort()

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

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

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

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

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

Class SQLOutput

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 writer methods writeBoolean writeCharacterStream and so on) 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 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 writer 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 SQLPermission

The permission for which the SecurityManager will check when code that is running in an applet calls one of the DriverManager.setLogWriter methods. These methods include thosemethod inor the following list. DriverManager.setLogWriter DriverManager.setLogStream (deprecated) javax.sql.DataSource.setLogWriter javax.sql.ConnectionPoolDataSource.setLogWriter javax.sql.XADataSourcemethod.setLogWriter If there is no SQLPermission object this method throwsthese methods throw a java.lang.SecurityException as a runtime exception.

A SQLPermission object contains a name (also referred to as a "target name") but no actions list; there is either a named permission or there is not. The target name is the name of the permission (see below). The naming convention follows the hierarchical property naming convention. In addition an asterisk may appear at the end of the name following a "." or by itself to signify a wildcard match. For example: loadLibrary.* or * is valid but *loadLibrary or a*b is not valid.

The following table lists all the possible SQLPermission target names. Currently the only name allowed is setLog. The table gives a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name What the Permission Allows Risks of Allowing this Permission
setLog Setting of the logging stream This is a dangerous permission to grant. The contents of the log may contain usernames and passwords SQL statements and SQL data.
The person running an applet decides what permissions to allow and will run the Policy Tool to create an SQLPermission in a policy file. A programmer does not use a constructor directly to create an instance of SQLPermission but rather uses a tool. @since 1.3 @see java.security.BasicPermission @see java.security.Permission @see java.security.Permissions @see java.security.PermissionCollection @see java.lang.SecurityManager


Class SQLWarning

An exception that provides information on database access warnings. Warnings are silently chained to the object whose method caused it to be reported.

Warnings may be retrieved from Connection Statement and ResultSet objects. Trying to retrieve a warning on a connection after it has been closed will cause an exception to be thrown. Similarly trying to retrieve a warning on a statement after it has been closed or on a result set after it has been closed will cause an exception to be thrown. Note that closing a statement also closes a result set that it might have produced. @see Connection#getWarnings @see Statement#getWarnings @see ResultSet#getWarnings

Class SQLWarning, constructor SQLWarning(String)

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

Constructs an SQLWarning object with the given reason and SQLState; the vendorCode defaults to 0. @param reason a description of the warning @param SQLStateSQLstate an XOPEN code identifying the warning
Class SQLWarning, constructor SQLWarning(String, String, int)

Constructs a fully-specified SQLWarning object initialized with the given values. @param reason a description of the warning @param SQLStateSQLstate an XOPEN code identifying the warning @param vendorCode a database vendor-specific warning code
Class SQLWarning, SQLWarning getNextWarning()

Retrieves the warning chained to this SQLWarning object. @return the next SQLException in the chain; null if none @see #setNextWarning
Class SQLWarning, void setNextWarning(SQLWarning)

Adds an SQLWarning object to the end of the chain. @param w the new end of the SQLException chain @see #getNextWarning

Class Statement

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

Only By default only one ResultSet object per Statement object can be open at any pointthe insame time. Therefore if the reading of one ResultSet object is interleaved with the reading of another each must have been generated by different Statement objects. All statementexecution methods in the executeStatement methodsinterface implicitly close a statment's current ResultSet object if an open one exists. @see Connection#createStatement @see ResultSet

Class Statement, void addBatch(String)

Adds anthe given SQL command to the current batchlist of commmands for this Statement object. The commands in this list can be executed as a batch by calling the method executeBatch.

NOTE: 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.2updates @see What Is in the#executeBatch JDBC@since 21.0 API2

Class Statement, void clearBatch()

MakesEmpties the setthis ofStatement commandsobject's in the current batch emptycurrent list of SQL commands.

NOTE: This method is optional. @exception SQLException if a database access error occurs or the driver does not support batch statements @since 1.2updates @see What Is in the#addBatch JDBC@since 21.0 API2

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.

Calling the method close on a Statement object that is already closed has no effect.

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 anthe given SQL statement thatwhich may return multiple results. UnderIn 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 an SQL statement and indicates the form of the first result. You canmust 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 nextfirst 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()

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 -2SUCCESS_NO_INFO -- 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. If 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 -3EXECUTE_FAILED -- 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 not 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 are ordered according to the order in which commands were added to 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 anthe given SQL statement thatwhich returns a single ResultSet object. @param sql typicallyan SQL statement this isto be sent to the database typically 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 or the given SQL statement produces anything other than a single ResultSet object
Class Statement, int executeUpdate(String)

Executes anthe given SQL statement which may be an INSERT UPDATE or DELETE statement. In additionor an SQL statementsstatement that returnreturns nothing such as an SQL DDL statements can be executedstatement. @param sql an SQL INSERT UPDATE or DELETE statement or an 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 or the given SQL statement produces a ResultSet object
Class Statement, Connection getConnection()

ReturnsRetrieves 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()

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#setFetchDirection
Class Statement, int getFetchSize()

Retrieves the number of result set rows that is the default fetch size for resultResultSet setsobjects 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#setFetchSize
Class Statement, int getMaxFieldSize()

ReturnsRetrieves the maximum number of bytes allowed for anythat columncan value.be This limit is the maximum number of bytes thatreturned for character and binary column values in a canResultSet be returned for anyobject produced by this columnStatement valueobject. TheThis 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 for columns storing character and binary values; zero means unlimitedthere is no limit @exception SQLException if a database access error occurs @see #setMaxFieldSize
Class Statement, int getMaxRows()

Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain. If thethis limit is exceeded the excess rows are silently dropped. @return the current maxmaximum number rowof limitrows for a ResultSet object produced by this Statement object; zero means unlimitedthere is no limit @exception SQLException if a database access error occurs @see #setMaxRows
Class Statement, boolean getMoreResults()

Moves to athis Statement object's next result. It returns true if this resultit is a ResultSet object. This method alsoand implicitly closes any current ResultSet object(s) 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 unlimitedthere is no limit @exception SQLException if a database access error occurs @see #setQueryTimeout
Class Statement, ResultSet getResultSet()

ReturnsRetrieves the current result as a ResultSet object. This method should be called only once per result. @return the current result as a ResultSet object; or 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()

Retrieves the result set concurrency for ResultSet objects generated by this Statement object. @return either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class Statement, int getResultSetType()

Retrieves 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 @sinceexception 1.2SQLException @seeif Whata Is in the JDBCdatabase access error occurs 2.0@since API1.2
Class Statement, int getUpdateCount()

ReturnsRetrieves 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 the 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. This method may not be called on a closed Statement object; doing so will cause an SQLException to be thrown.

Note: If you are processing a ResultSet object any warnings associated with reads on that ResultSet object will be chained on it rather than on the Statement object that produced it. @return the first SQLWarning object or null if there are no warnings @exception SQLException if a database access error occurs or this method is called on a closed statement

Class Statement, void setCursorName(String)

DefinesSets the SQL cursor name thatto the given String which will be used by subsequent Statement object execute methods. This name can then be used in SQL positioned update/ or delete statements to identify the current row in the ResultSet object generated by this statement. If the database doesn'tdoes not 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 ofhave the form 'select forSELECT updateFOR ...'UPDATE. If the 'for update'FOR phraseUPDATE is omittednot present positioned updates may fail.

Note: By definition the execution of positioned update/deleteupdates executionand deletes must be done by a different Statement object than the one whichthat 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 statement to the database. Note: Since prepared statements have usually been parsed prior to making this call disabling escape processing for preparedPreparedStatements statementsobjects will have no effect. @param enable true to enable escape processing; false to disable it @exception SQLException if a database access error occurs
Class Statement, void setFetchDirection(int)

Gives the driver a hint as to the direction in which the rows in a result set will be processed. The hint applies only toin resultResultSet setsobjects 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#getFetchDirection

Class Statement, void setFetchSize(int)

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#getFetchSize
Class Statement, void setMaxFieldSize(int)

Sets the limit for the maximum number of bytes in a column toResultSet the given number ofcolumn storing character or bytes.binary This isvalues to the maximumgiven 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 in bytes; zero means unlimitedthere is no limit @exception SQLException if a database access error occurs or the condition max >= 0 is not satisfied @see #getMaxFieldSize
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 unlimitedthere is no limit @exception SQLException if a database access error occurs or the condition max >= 0 is not satisfied @see #getMaxRows
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 an SQLException is thrown. @param seconds the new query timeout limit in seconds; zero means unlimitedthere is no limit @exception SQLException if a database access error occurs or the condition seconds >= 0 is not satisfied @see #getQueryTimeout

Class Struct

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, String getSQLTypeName()

Retrieves the SQL type name of the SQL structured type that this Struct object represents. @returnsreturn the fully-qualified type name of the SQL structured type for which this Struct object is the generic representation @exception SQLException if a database access error occurs

Class Time

A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as aan 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.

The result is undefined if a given argument is out of bounds. @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 TIME values do not have a date component. @deprecated @exception java.lang.IllegalArgumentException if this method is invoked @see #setDate
Class Time, int getMonth()

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

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

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

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

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

Formats a time in JDBC datetime escape format. @return a String in hh:mm:ss format @overrides java.util.Date.toString
Class Time, Time valueOf(String)

Converts a string in JDBC time escape format to a Time value. @param s time in format "hh:mm:ss" @return a corresponding Time object @overrides java.util.Date.valueOf

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

Constructs a Timestamp object initialized with the given values. @param year the year- minus 1900 @param month 0 to 11 @param date 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) @exception IllegalArgumentException if the nano argument is out of bounds
Class Timestamp, constructor Timestamp(long)

Constructs a Timestamp object using a milliseconds time value. The integral seconds are stored in the underlying date value; the fractional seconds are stored in the nanos field of the Timestamp object. @param time milliseconds since January 1 1970 00:00:00 GMT. A negative number is the number of milliseconds before January 1 1970 00:00:00 GMT. @see java.util.Calendar for more information
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 @return true if the given Object instance is equal to this Timestamp object; false otherwise
Class Timestamp, boolean equals(Timestamp)

Tests to see if this Timestamp object is equal to the given Timestamp object. @param ts the Timestamp value to compare with @return true if the given Timestamp object is equal to this Timestamp object; false otherwise
Class Timestamp, int getNanos()

Gets this Timestamp object's nanos value. @return this Timestamp object's fractional seconds component @see #setNanos
Class Timestamp, long getTime()

Returns the number of milliseconds since January 1 1970 00:00:00 GMT represented by this DateTimestamp object. @return the number of milliseconds since January 1 1970 00:00:00 GMT represented by this date. @see #setTime
Class Timestamp, void setNanos(int)

Sets this Timestamp object's nanos field 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 @see #getNanos
Class Timestamp, void setTime(long)

Sets this DateTimestamp object to represent a point in time that is time milliseconds after January 1 1970 00:00:00 GMT. @param time the number of milliseconds. @see #getTime @see #Timestamp(long time) @see java.util.Calendar for more information

Class Types, int ARRAY

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

The constant in the Java programming language sometimes referred to as a type code that identifies the generic SQL type BLOB. @since 1.2 @see What Is in the JDBC 2.0 API
Class Types, int CLOB

The constant in the Java programming language sometimes referred to as a type code that identifies the generic SQL type CLOB. @since 1.2 @see What Is in the JDBC 2.0 API
Class Types, int DISTINCT

The constant in the Java programming language sometimes referred to as a type code that identifies the generic SQL type DISTINCT. @since 1.2 @see What Is in the JDBC 2.0 API
Class Types, int JAVA_OBJECT

The constant in the Java programming language sometimes referred to as a type code that identifies the generic SQL type JAVA_OBJECT. @since 1.2 @see What Is in the JDBC 2.0 API
Class Types, int REF

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

The constant in the Java programming language sometimes referred to as a type code that identifies the generic SQL type STRUCT. @since 1.2 @see What Is in the JDBC 2.0 API