Hi,
Attached is the patch for update using updatable resultset apis on a forward
only updatable resultset.
I have run all the tests and the patch hasn't caused any failures.
Just to recap, the JDBC 2.0 API introduced the ability to update/delete/insert
rows from a ResultSet
using methods in the Java programming language rather than having to send an
SQL command.
Delete using updatable resultset api for forward only resultsets has already
been committed to Derby.
This patch will allow updates using JDBC 2.0 apis for forward only resultset.
This patch utilizes existing positioned update cursor code and hence the SELECT
sql sent on the
Statement object has the same syntax and restrictions as for FOR UPDATE sql for
updatable cursors.
One difference to notice between updatable cursors and updatable ResultSets is
that the JDBC
program is not required to have autocommit off when using updatable ResultSets
JDBC apis..
One other important restriction to remember is correlation names are not
allowed for column names
if those columns are going to be used for updateXXX. e.g.
stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery("SELECT c1 as col1, c2 as col2 FROM t1 abcde FOR UPDATE
of c1");
rs.next();
System.out.println("column 1 on this row is " + rs.getInt(1));
try {
System.out.println("attempt to send updateXXX on correlation name column will
fail");
rs.updateShort(1, (new Integer(123)).shortValue());
System.out.println("FAIL!!! updateXXX should have failed");
}
catch (SQLException e) {
dumpSQLExceptions(e);
}
Some tidbits about the functionality and implementation
1)After updateRow, ResultSet will move from the current row to right before the
next row. One
exception to this is if no updateXXX call were issued before the updateRow.
i.e. if updateRow is
issued w/o any updateXXX calls, then ResultSet will continue to stay on the
current row.
This behavior would be easy to change if we decide that we should always move
the ResultSet
to right before the next row after an updateRow method.
2)The main DatabaseMetaData calls for this functionality are updatesAreDetected,
ownUpdatesAreVisible, othersUpdatesAreVisible. Since ResultSet is moved off the
current row
after the updateRow method, updatesAreDetected will always return false. Also,
because this
patch is for forward only resultsets, ownUpdatesAreVisible will always return
false. In
addition, since Derby materializes a forward only ResultSet incrementally, it
is possible
to see changes made by the others and that is why othersUpdatesAreVisible will
return true
for forward only ResultSets. One related method in the ResultSet is rowUpdated.
As per the
JDBC specs, ResultSet.rowUpdated should only be used if drivers can detect
updates. Since
Derby can't detect updates, a JDBC program should not use ResultSet.rowUpdated.
3)To reiterate the earlier comment, correlation names are not allowed for
column names if
those columns are going to be used for updateXXX.
4)Before every updateXXX/updateRow/deleteRow/cancelRowUpdates, following checks
are performed.
//1)Make sure this is an updatable ResultSet
//2)Make sure JDBC ResultSet is not closed
//3)Make sure JDBC ResultSet is positioned on a row
//4)Make sure underneath language resultset is not closed
//5)Make sure for updateXXX methods, the column position is not out of range
//6)Make sure the column corresponds to a column in the base table and it
is not a derived column
//7)Make sure correlation names are not used for base table column names in
updateXXXX. This is because the mapping
// of correlation name to base table column position is not available at
runtime.
5)There are 2 master files for the test now because there are few updatable
resultset apis like
updateBlob, updateClob etc which were introduced in JDBC3.0 and are not
available under JDBC2.0.
When running under JDBC2.0, those tests will not be run and hence the masters
are different.
6)Following new SQL States have been added by this patch
a)XCL14 - If the column index passed to updateXXX is out of range, this
exception will be thrown e.g.
stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery("SELECT c1, c2 FROM t1 FOR UPDATE");
rs.next();
System.out.println("There are only 2 columns in the select list and we are
trying to send updateXXX on column position
3");
try {
rs.updateInt(3,22);
System.out.println("FAIL!!! updateInt should have failed because there are
only 2 columns in the select list");
}
catch (SQLException e) {
dumpSQLExceptions(e);
}
b)XJ084 - If updateXXX is issued for a column which is a derived column or a
correlation column, then there will be
exception
System.out.println("---Negative Test15 - Can't call updateXXX methods on
columns that do not correspond to a column in
the table");
stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery("SELECT 1, 2 FROM tableWithPrimaryKey FOR UPDATE");
rs.next();
try {
rs.updateInt(1,22);
System.out.println("FAIL!!! updateInt should have failed because it is trying
to update a column that does not
correspond to column in base table");
}
catch (SQLException e) {
dumpSQLExceptions(e);
}
rs = stmt.executeQuery("SELECT c1 as col1, c2 as col2 FROM t1 abcde FOR UPDATE
of c1");
rs.next();
try {
System.out.println("attempt to send updateXXX on correlation name column will
fail");
rs.updateShort(1, (new Integer(123)).shortValue());
System.out.println("FAIL!!! updateXXX should have failed");
}
catch (SQLException e) {
dumpSQLExceptions(e);
}
7)I have added lots of new tests. But if anyone thinks of a corner case that we
should be testing,
let me know.
Following is the output of svn stat
M java\engine\org\apache\derby\impl\jdbc\EmbedResultSet.java
M java\engine\org\apache\derby\impl\jdbc\EmbedDatabaseMetaData.java
M java\engine\org\apache\derby\impl\jdbc\EmbedResultSet20.java
M java\engine\org\apache\derby\iapi\reference\SQLState.java
M java\engine\org\apache\derby\loc\messages_en.properties
M java\testing\org\apache\derbyTesting\functionTests\tests\lang\build.xml
M
java\testing\org\apache\derbyTesting\functionTests\tests\lang\updatableResultSet.java
M
java\testing\org\apache\derbyTesting\functionTests\tests\jdbcapi\resultsetJdbc30.java
M
java\testing\org\apache\derbyTesting\functionTests\master\resultsetJdbc30.out
M
java\testing\org\apache\derbyTesting\functionTests\master\updatableResultSet.out
A java\testing\org\apache\derbyTesting\functionTests\master\jdk14
A
java\testing\org\apache\derbyTesting\functionTests\master\jdk14\updatableResultSet.out
Please send in your comments/vote.
Mamta
Index: java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (revision
151757)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (working copy)
@@ -84,8 +84,8 @@
// mutable state
protected ExecRow currentRow;
- //rowData is protected so deleteRow in EmbedResultSet20.java can make
it null.
- //This ensures that after deleteRow, ResultSet is not positioned on the
deleted row.
+ //deleteRow & updateRow in EmbedResultSet20 make rowData null so that
ResultSet is not positioned on any row.
+ //This ensures that after deleteRow and updateRow, ResultSet is not
positioned on the deleted/updated row.
protected DataValueDescriptor[] rowData;
protected boolean wasNull;
protected boolean isClosed;
@@ -108,7 +108,6 @@
// Order of creation
final int order;
-
private final ResultDescription resultDescription;
// max rows limit for this result set
@@ -123,7 +122,6 @@
*/
private int NumberofFetchedRows;
-
/*
we hang on to the statement to prevent GC from
closing it under us
@@ -135,6 +133,11 @@
protected final int concurrencyOfThisResultSet;
+ //these are the original contents of the row which is getting updated.
The original contents will be required
+ //if user decides to cancel the changes made to the row using
cancelRowUpdates.
+ protected DataValueDescriptor[] copyOfDatabaseRow;
+ protected boolean[] columnGotUpdated; //these are the columns which
have been updated so far. Used to build UPDATE...WHERE CURRENT OF sql
+
/**
* This class provides the glue between the Cloudscape
* resultset and the JDBC resultset, mapping calls-to-calls.
@@ -266,6 +269,8 @@
}
}
+ copyOfDatabaseRow = null;
+ columnGotUpdated = null;
return movePosition(NEXT, 0, "next");
}
@@ -498,6 +503,8 @@
currentRow = null;
rowData = null;
rMetaData = null; // let it go, we can make a new one
+ copyOfDatabaseRow = null;
+ columnGotUpdated = null;
// we hang on to theResults and messenger
// in case more calls come in on this resultSet
@@ -1771,5 +1778,10 @@
return newSQLException(SQLState.LANG_DATA_TYPE_GET_MISMATCH,
targetType,
resultDescription.getColumnDescriptor(column).getType().getTypeId().getSQLTypeName());
}
+
+ protected final SQLException dataTypeConversion(int column, String
targetType) {
+ return newSQLException(SQLState.LANG_DATA_TYPE_GET_MISMATCH,
+
resultDescription.getColumnDescriptor(column).getType().getTypeId().getSQLTypeName(),
targetType);
+ }
}
Index: java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
(revision 151757)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
(working copy)
@@ -20,45 +20,31 @@
package org.apache.derby.impl.jdbc;
-import org.apache.derby.iapi.services.info.ProductGenusNames;
import org.apache.derby.iapi.services.info.ProductVersionHolder;
-import org.apache.derby.iapi.services.sanity.SanityManager;
import org.apache.derby.iapi.services.monitor.Monitor;
import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
import org.apache.derby.iapi.sql.dictionary.DataDictionary;
-import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
import org.apache.derby.iapi.sql.dictionary.SPSDescriptor;
-import org.apache.derby.iapi.sql.execute.ConstantAction;
-
-import org.apache.derby.iapi.store.access.TransactionController;
-
import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.impl.sql.catalog.DD_Version;
import org.apache.derby.impl.sql.execute.GenericConstantActionFactory;
import org.apache.derby.impl.sql.execute.GenericExecutionFactory;
-import org.apache.derby.catalog.UUID;
-
-import org.apache.derby.iapi.reference.SQLState;
import org.apache.derby.iapi.reference.DB2Limit;
import org.apache.derby.iapi.reference.JDBC20Translation;
import org.apache.derby.iapi.reference.JDBC30Translation;
import java.util.Properties;
-import java.util.Enumeration;
import java.sql.DatabaseMetaData;
import java.sql.Connection;
-import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
import java.sql.Types;
import java.io.IOException;
@@ -2414,7 +2400,7 @@
* @see Connection
*/
public boolean supportsResultSetConcurrency(int type, int concurrency) {
- //FORWARD_ONLY + CONCUR_UPDATABLE combination is supported (at
this point, delete functionality only)
+ //FORWARD_ONLY + CONCUR_UPDATABLE combination is supported (at
this point, delete and update functionality only)
if ((type == JDBC20Translation.TYPE_FORWARD_ONLY) &&
(concurrency ==
JDBC20Translation.CONCUR_UPDATABLE))
return true;
@@ -2483,6 +2469,8 @@
* @param result set type, i.e. ResultSet.TYPE_XXX
* @return true if changes are detected by the resultset type
*/
+ //updatable resultsets are supported for forward only resultset types
only. And for forward only
+ //resultsets, we move to before the next row after a update and that is
why updatesAreDetected returns false
public boolean updatesAreDetected(int type) {
return false;
}
@@ -2490,13 +2478,15 @@
/**
* JDBC 2.0
*
- * Determine whether or not a visible row delete can be detected by
+ * Determine whether or not a visible row delete can be detected by
* calling ResultSet.rowDeleted(). If deletesAreDetected()
* returns false, then deleted rows are removed from the result set.
*
* @param result set type, i.e. ResultSet.TYPE_XXX
* @return true if changes are detected by the resultset type
*/
+ //updatable resultsets are supported for forward only resultset types
only. And for forward only
+ //resultsets, we move to before the next row after a delete and that is
why deletesAreDetected returns false
public boolean deletesAreDetected(int type) {
return false;
}
Index: java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java
(revision 151757)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java
(working copy)
@@ -23,7 +23,6 @@
import org.apache.derby.iapi.reference.JDBC20Translation;
import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.sql.Activation;
import org.apache.derby.iapi.sql.ResultSet;
import org.apache.derby.iapi.sql.execute.ExecCursorTableReference;
@@ -32,9 +31,15 @@
import org.apache.derby.impl.jdbc.Util;
import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
import org.apache.derby.iapi.sql.conn.StatementContext;
-
+
import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.types.BitDataValue;
+import org.apache.derby.iapi.types.DateTimeDataValue;
+import org.apache.derby.iapi.types.StringDataValue;
+import org.apache.derby.iapi.types.TypeId;
+import org.apache.derby.iapi.services.io.LimitReader;
+
import java.sql.Statement;
import java.sql.SQLException;
import java.sql.Types;
@@ -43,11 +48,18 @@
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
+import java.sql.Date;
import java.sql.Ref;
+import java.sql.Time;
+import java.sql.Timestamp;
import java.math.BigDecimal;
import java.net.URL;
+import org.apache.derby.iapi.sql.execute.CursorActivation;
+import org.apache.derby.iapi.sql.ResultDescription;
+import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
+import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
/**
* This class extends the EmbedResultSet class in order to support new
* methods and classes that come with JDBC 2.0.
@@ -70,7 +82,7 @@
//////////////////////////////////////////////////////////////
/**
- * This class provides the glue between the Cloudscape
+ * This class provides the glue between the Derby
* resultset and the JDBC resultset, mapping calls-to-calls.
*/
public EmbedResultSet20(org.apache.derby.impl.jdbc.EmbedConnection
conn,
@@ -554,41 +566,125 @@
* @see EmbedDatabaseMetaData#updatesAreDetected
*/
public boolean rowUpdated() throws SQLException {
- throw Util.notImplemented();
+ return false;
}
/**
* JDBC 2.0
*
- * Determine if the current row has been inserted. The value returned
+ * Determine if the current row has been inserted. The value returned
* depends on whether or not the result set can detect visible inserts.
*
* @return true if inserted and inserts are detected
* @exception SQLException if a database-access error occurs
- *
+ *
* @see EmbedDatabaseMetaData#insertsAreDetected
*/
public boolean rowInserted() throws SQLException {
throw Util.notImplemented();
}
-
+
/**
* JDBC 2.0
*
* Determine if this 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
+ * detect holes in a result set. The value returned depends on whether
* or not the result set can detect deletions.
*
* @return true if deleted and deletes are detected
* @exception SQLException if a database-access error occurs
- *
+ *
* @see EmbedDatabaseMetaData#deletesAreDetected
*/
public boolean rowDeleted() throws SQLException {
return false;
}
+ //do following few checks before accepting updatable resultset api
+ //1)Make sure this is an updatable ResultSet
+ //2)Make sure JDBC ResultSet is not closed
+ //3)Make sure JDBC ResultSet is positioned on a row
+ //4)Make sure underneath language resultset is not closed
+ //5)Make sure for updateXXX methods, the column position is not out of
range
+ //6)Make sure the column corresponds to a column in the base table and it
is not a derived column
+ //7)Make sure correlation names are not used for base table column names
in updateXXXX. This is because the mapping
+ // of correlation name to base table column position is not available at
runtime.
+ private void checkResultSetStatus(String methodName, int columnIndex)
throws SQLException {
+
+ //1)Make sure this is an updatable ResultSet
+ if (getConcurrency() != JDBC20Translation.CONCUR_UPDATABLE)//if not
updatable resultset, then throw exception
+ throw
Util.generateCsSQLException(SQLState.UPDATABLE_RESULTSET_API_DISALLOWED,
methodName);
+
+ //2)Make sure JDBC ResultSet is not closed
+ checkIfClosed(methodName);
+
+ //3)Make sure JDBC ResultSet is positioned on a row
+ checkOnRow(); // first make sure there's a current row
+ //in case of autocommit on, if there was an exception which caused
runtime rollback in this transaction prior to this call,
+ //the rollback code will mark the language resultset closed (it doesn't
mark the JDBC ResultSet closed).
+ //That is why alongwith the earlier checkIfClosed call in this method,
there is a check for language resultset close as well.
+
+ //4)Make sure underneath language resultset is not closed
+ if (theResults.isClosed())
+ throw Util.generateCsSQLException(SQLState.LANG_RESULT_SET_NOT_OPEN,
methodName);
+
+ //the remaining checks only apply to updateXXX methods
+ if (methodName.equals("updateRow") || methodName.equals("deleteRow") ||
methodName.equals("cancelRowUpdates"))
+ return;
+
+ //5)Make sure for updateXXX methods, the column position is not out of
range
+ ResultDescription rd = theResults.getResultDescription();
+ if (columnIndex < 1 || columnIndex > rd.getColumnCount())
+ throw
Util.generateCsSQLException(SQLState.LANG_INVALID_COLUMN_POSITION, new
Integer(columnIndex), String.valueOf(rd.getColumnCount()));
+
+ //6)Make sure the column corresponds to a column in the base table and
it is not a derived column
+ if (rd.getColumnDescriptor(columnIndex).getSourceTableName() == null)
+ throw Util.generateCsSQLException(SQLState.COLUMN_NOT_FROM_BASE_TABLE,
methodName);
+
+ //7)Make sure correlation names are not used for base table column names
in updateXXX. This is because the mapping
+ // of correlation name to base table column position is not available
at runtime.
+ TableDescriptor td = null;
+ setupContextStack();
+ try {
+ LanguageConnectionContext lcc =
getEmbedConnection().getLanguageConnection();
+ CursorActivation activation =
lcc.lookupCursorActivation(getCursorName());
+ ExecCursorTableReference targetTable =
activation.getPreparedStatement().getTargetTable();
+ SchemaDescriptor sd = null;
+ if (targetTable.getSchemaName() != null)
+ sd =
lcc.getDataDictionary().getSchemaDescriptor(targetTable.getSchemaName(),null,
false);
+ else
+ sd =
lcc.getDataDictionary().getSchemaDescriptor(lcc.getCurrentSchemaName(),null,
false);
+
+ if ((sd != null) &&
sd.getSchemaName().equals(SchemaDescriptor.STD_DECLARED_GLOBAL_TEMPORARY_TABLES_SCHEMA_NAME))
+ td =
lcc.getTableDescriptorForDeclaredGlobalTempTable(targetTable.getBaseName());
//check if this is a temp table before checking data dictionary
+
+ if (td == null) //td null here means it is not a temporary table. Look
for table in physical SESSION schema
+ td =
lcc.getDataDictionary().getTableDescriptor(targetTable.getBaseName(), sd);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ } finally {
+ restoreContextStack();
+ }
+
+ //if can't find the column in the base table, then throw exception. This
will happen if correlation name is used for column names
+ if
(td.getColumnDescriptor(rd.getColumnDescriptor(columnIndex).getName()) == null)
+ throw Util.generateCsSQLException(SQLState.COLUMN_NOT_FROM_BASE_TABLE,
methodName);
+ }
+
+ //mark the column as updated and put the new values into the row
+ private void updateColumn(int columnIndex, DataValueDescriptor dv, String
updateMethodName) throws SQLException {
+ checkResultSetStatus(updateMethodName, columnIndex);
+ if (copyOfDatabaseRow == null) {
+ //this is the first updateXXX method call on this row. Save
the original content of the row into copyOfDatabaseRow
+ //The saved copy of the row will be needed if cancelRowUpdates
is issued
+ copyOfDatabaseRow = currentRow.getRowArrayClone();
+ columnGotUpdated = new boolean[getMetaData().getColumnCount()];
+ }
+ currentRow.setColumn(columnIndex, dv);
+ columnGotUpdated[columnIndex-1] = true;
+ }
+
/**
* JDBC 2.0
*
@@ -602,9 +698,23 @@
* @param columnIndex the first column is 1, the second is 2, ...
* @exception SQLException if a database-access error occurs
*/
- public void updateNull(int columnIndex) throws SQLException {
- throw Util.notImplemented();
+ public void updateNull(int columnIndex) throws SQLException {
+ //Since this method does not call updateColumn, we have to call
checkResultSetStatus here.
+ //Most other updateXXX methods rely on updateColumn to make that call
+ checkResultSetStatus("updateNull", columnIndex);
+ try {
+ if (copyOfDatabaseRow == null) {
+ //this is the first updateXXX method call on this row. Save
the original content of the row into copyOfDatabaseRow
+ //The saved copy of the row will be needed if cancelRowUpdates
is issued
+ copyOfDatabaseRow = currentRow.getRowArrayClone();
+ columnGotUpdated = new boolean[getMetaData().getColumnCount()];
+ }
+ currentRow.getColumn(columnIndex).setToNull();
+ columnGotUpdated[columnIndex-1] = true;
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
@@ -621,8 +731,8 @@
* @exception SQLException if a database-access error occurs
*/
public void updateBoolean(int columnIndex, boolean x) throws SQLException {
- throw Util.notImplemented();
- }
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),
"updateBoolean");
+ }
/**
* JDBC 2.0
@@ -639,7 +749,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateByte(int columnIndex, byte x) throws SQLException {
- throw Util.notImplemented();
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateByte");
}
/**
@@ -657,7 +767,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateShort(int columnIndex, short x) throws SQLException {
- throw Util.notImplemented();
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateShort");
}
/**
@@ -675,7 +785,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateInt(int columnIndex, int x) throws SQLException {
- throw Util.notImplemented();
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateInt");
}
/**
@@ -693,7 +803,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateLong(int columnIndex, long x) throws SQLException {
- throw Util.notImplemented();
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateLong");
}
/**
@@ -711,8 +821,12 @@
* @exception SQLException if a database-access error occurs
*/
public void updateFloat(int columnIndex, float x) throws SQLException {
- throw Util.notImplemented();
+ try {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateFloat");
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
@@ -729,16 +843,20 @@
* @exception SQLException if a database-access error occurs
*/
public void updateDouble(int columnIndex, double x) throws SQLException {
- throw Util.notImplemented();
+ try {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateDouble");
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
- *
+ *
* Update a column with a BigDecimal value.
*
* The updateXXX() methods are used to update column values in the
- * current row, or the insert row. The updateXXX() methods do not
+ * 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.
*
@@ -748,16 +866,20 @@
*/
public void updateBigDecimal(int columnIndex, BigDecimal x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDecimalDataValue(x),"updateBigDecimal");
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
- *
+ *
* Update a column with a String value.
*
* The updateXXX() methods are used to update column values in the
- * current row, or the insert row. The updateXXX() methods do not
+ * 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.
*
@@ -766,7 +888,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateString(int columnIndex, String x) throws SQLException {
- throw Util.notImplemented();
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getCharDataValue(x),"updateString");
}
/**
@@ -784,16 +906,20 @@
* @exception SQLException if a database-access error occurs
*/
public void updateBytes(int columnIndex, byte x[]) throws SQLException {
- throw Util.notImplemented();
+ try {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getBitDataValue(x),"updateBytes");
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
- *
+ *
* Update a column with a Date value.
*
* The updateXXX() methods are used to update column values in the
- * current row, or the insert row. The updateXXX() methods do not
+ * 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.
*
@@ -803,8 +929,12 @@
*/
public void updateDate(int columnIndex, java.sql.Date x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateDate");
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
@@ -822,8 +952,12 @@
*/
public void updateTime(int columnIndex, java.sql.Time x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateTime");
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
@@ -831,7 +965,7 @@
* Update a column with a Timestamp value.
*
* The updateXXX() methods are used to update column values in the
- * current row, or the insert row. The updateXXX() methods do not
+ * 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.
*
@@ -841,8 +975,12 @@
*/
public void updateTimestamp(int columnIndex, java.sql.Timestamp x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),"updateTimestamp");
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
@@ -859,13 +997,38 @@
* @param length the length of the stream
* @exception SQLException if a database-access error occurs
*/
- public void updateAsciiStream(int columnIndex,
- java.io.InputStream x,
+ public void updateAsciiStream(int columnIndex,
+ java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ //If the column type is the right datatype, this method will
eventually call updateColumn which will check for
+ //the read only resultset. But for other datatypes, we want to catch
if this updateAsciiStream is being issued
+ //against a read only resultset. And that is the reason for call to
checkResultSetStatus here.
+ checkResultSetStatus("updateAsciiStream", columnIndex);
+
+ int colType = getColumnType(columnIndex);
+ switch (colType) {
+ case Types.CHAR:
+ case Types.VARCHAR:
+ case Types.LONGVARCHAR:
+ case Types.CLOB:
+ break;
+ default:
+ throw dataTypeConversion(columnIndex, "java.io.InputStream");
}
- /**
+ java.io.Reader r = null;
+ if (x != null)
+ {
+ try {
+ r = new java.io.InputStreamReader(x, "ISO-8859-1");
+ } catch (java.io.UnsupportedEncodingException uee) {
+ throw new SQLException(uee.getMessage());
+ }
+ }
+ updateCharacterStream(columnIndex, r, length);
+ }
+
+ /**
* JDBC 2.0
*
* Update a column with a binary stream value.
@@ -880,12 +1043,66 @@
* @param length the length of the stream
* @exception SQLException if a database-access error occurs
*/
- public void updateBinaryStream(int columnIndex,
+ public void updateBinaryStream(int columnIndex,
java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ //If the column type is the right datatype, this method will
eventually call updateColumn which will check for
+ //the read only resultset. But for other datatypes, we want to catch
if this updateBinaryStream is being issued
+ //against a read only resultset. And that is the reason for call to
checkResultSetStatus here.
+ checkResultSetStatus("updateBinaryStream", columnIndex);
+ int colType = getColumnType(columnIndex);
+ switch (colType) {
+ case Types.BINARY:
+ case Types.VARBINARY:
+ case Types.LONGVARBINARY:
+ case Types.BLOB:
+ break;
+ default:
+ throw dataTypeConversion(columnIndex, "java.io.InputStream");
}
+ if (length < 0) //we are doing the check here and not in
updateBinaryStreamInternal becuase updateClob needs to pass -1 for length.
+ throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH);
+ if (x == null)
+ {
+ updateNull(columnIndex);
+ return;
+ }
+
+ updateBinaryStreamInternal(columnIndex, x,
length,"updateBinaryStream");
+ }
+
+ protected void updateBinaryStreamInternal(int columnIndex,
+ java.io.InputStream x, int
length, String updateMethodName)
+ throws SQLException
+ {
+ try {
+ DataValueDescriptor dvd;
+ int colType = getColumnType(columnIndex);
+ switch (colType) {
+ case Types.BINARY:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullBit(null);
+ break;
+ case Types.VARBINARY:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullVarbit(null);
+ break;
+ case Types.LONGVARBINARY:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullLongVarbit(null);
+ break;
+ case Types.BLOB:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullBlob(null);
+ break;
+ default:
+ throw dataTypeConversion(columnIndex,
"java.io.InputStream");
+ }
+ dvd.setValue(new RawToBinaryFormatStream(x, length), length);
+ updateColumn(columnIndex, dvd, updateMethodName);
+
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
+ }
+
/**
* JDBC 2.0
*
@@ -904,9 +1121,67 @@
public void updateCharacterStream(int columnIndex,
java.io.Reader x,
int length) throws SQLException {
- throw Util.notImplemented();
+ //If the column type is the right datatype, this method will
eventually call updateColumn which will check for
+ //the read only resultset. But for other datatypes, we want to catch
if this updateCharacterStream is being issued
+ //against a read only resultset. And that is the reason for call to
checkResultSetStatus here.
+ checkResultSetStatus("updateCharacterStream", columnIndex);
+ int colType = getColumnType(columnIndex);
+ switch (colType) {
+ case Types.CHAR:
+ case Types.VARCHAR:
+ case Types.LONGVARCHAR:
+ case Types.CLOB:
+ break;
+ default:
+ throw dataTypeConversion(columnIndex, "java.io.Reader");
}
+ if (length < 0) //we are doing the check here and not in
updateCharacterStreamInternal becuase updateClob needs to pass -1 for length.
+ throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH);
+ if (x == null)
+ {
+ updateNull(columnIndex);
+ return;
+ }
+ updateCharacterStreamInternal(columnIndex, x, length,
"updateCharacterStream");
+ }
+
+ protected void updateCharacterStreamInternal(int columnIndex,
+ java.io.Reader reader, int
length, String updateMethodName)
+ throws SQLException
+ {
+ try {
+ LimitReader limitIn = new LimitReader(reader);
+ if (length != -1)
+ limitIn.setLimit(length);
+ ReaderToUTF8Stream utfIn = new ReaderToUTF8Stream(limitIn);
+
+ DataValueDescriptor dvd;
+ int colType = getColumnType(columnIndex);
+ switch (colType) {
+ case Types.CHAR:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullChar(null);
+ break;
+ case Types.VARCHAR:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullVarchar(null);
+ break;
+ case Types.LONGVARCHAR:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullLongvarchar(null);
+ break;
+ case Types.CLOB:
+ dvd =
getEmbedConnection().getLanguageConnection().getDataValueFactory().getNullClob(null);
+ break;
+ default:
+ throw dataTypeConversion(columnIndex, "java.io.Reader");
+ }
+ dvd.setValue(utfIn, length);
+ updateColumn(columnIndex, dvd, updateMethodName);
+
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
+ }
+
/**
* JDBC 2.0
*
@@ -926,8 +1201,23 @@
*/
public void updateObject(int columnIndex, Object x, int scale)
throws SQLException {
- throw Util.notImplemented();
+ updateObject(columnIndex, x);
+ /*
+ * If the parameter type is DECIMAL or NUMERIC, then
+ * we need to set the correct scale or set it
+ * to the default which is zero for setObject.
+ */
+ int colType = getColumnType(columnIndex);
+ try {
+ if ((colType == Types.DECIMAL) || (colType == Types.NUMERIC))
+ {
+ BigDecimal ret =
currentRow.getColumn(columnIndex).getBigDecimal();;
+ ret.setScale(scale);
+ }
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
/**
* JDBC 2.0
@@ -944,9 +1234,94 @@
* @exception SQLException if a database-access error occurs
*/
public void updateObject(int columnIndex, Object x) throws SQLException {
- throw Util.notImplemented();
+ //If the Object x is the right datatype, this method will eventually
call updateColumn which will check for
+ //the read only resultset. But for other datatypes of x, we want to
catch if this updateObject is being
+ //issued against a read only resultset. And that is the reason for
call to checkResultSetStatus here.
+ checkResultSetStatus("updateObject", columnIndex);
+ int colType = getColumnType(columnIndex);
+ if (colType ==
org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) {
+ updateColumn(columnIndex,
getEmbedConnection().getLanguageConnection().getDataValueFactory().getDataValue(x),
"updateObject");
+ return;
}
+ if (x == null) {
+ updateNull(columnIndex);
+ return;
+ }
+
+ if (x instanceof String) {
+ updateString(columnIndex, (String) x);
+ return;
+ }
+
+ if (x instanceof BigDecimal) {
+ updateBigDecimal(columnIndex, (BigDecimal) x);
+ return;
+ }
+
+ if (x instanceof Boolean) {
+ updateBoolean(columnIndex, ((Boolean) x).booleanValue());
+ return;
+ }
+
+ if (x instanceof Short) {
+ updateInt(columnIndex, ((Short) x).shortValue());
+ return;
+ }
+
+ if (x instanceof Integer) {
+ updateInt(columnIndex, ((Integer) x).intValue());
+ return;
+ }
+
+ if (x instanceof Long) {
+ updateLong(columnIndex, ((Long) x).longValue());
+ return;
+ }
+
+ if (x instanceof Float) {
+ updateFloat(columnIndex, ((Float) x).floatValue());
+ return;
+ }
+
+ if (x instanceof Double) {
+ updateDouble(columnIndex, ((Double) x).doubleValue());
+ return;
+ }
+
+ if (x instanceof byte[]) {
+ updateBytes(columnIndex, (byte[]) x);
+ return;
+ }
+
+ if (x instanceof Date) {
+ updateDate(columnIndex, (Date) x);
+ return;
+ }
+
+ if (x instanceof Time) {
+ updateTime(columnIndex, (Time) x);
+ return;
+ }
+
+ if (x instanceof Timestamp) {
+ updateTimestamp(columnIndex, (Timestamp) x);
+ return;
+ }
+
+ if (x instanceof Blob) {
+ updateBlob(columnIndex, (Blob) x);
+ return;
+ }
+
+ if (x instanceof Clob) {
+ updateClob(columnIndex, (Clob) x);
+ return;
+ }
+
+ throw dataTypeConversion(columnIndex, x.getClass().getName());
+ }
+
/**
* JDBC 2.0
*
@@ -960,8 +1335,8 @@
* @param columnName the name of the column
* @exception SQLException if a database-access error occurs
*/
- public void updateNull(String columnName) throws SQLException {
- throw Util.notImplemented();
+ public void updateNull(String columnName) throws SQLException {
+ updateNull(findColumnName(columnName));
}
/**
@@ -980,7 +1355,7 @@
*/
public void updateBoolean(String columnName, boolean x)
throws SQLException {
- throw Util.notImplemented();
+ updateBoolean(findColumnName(columnName), x);
}
/**
@@ -998,7 +1373,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateByte(String columnName, byte x) throws SQLException {
- throw Util.notImplemented();
+ updateByte(findColumnName(columnName), x);
}
/**
@@ -1016,7 +1391,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateShort(String columnName, short x) throws SQLException {
- throw Util.notImplemented();
+ updateShort(findColumnName(columnName), x);
}
/**
@@ -1034,7 +1409,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateInt(String columnName, int x) throws SQLException {
- throw Util.notImplemented();
+ updateInt(findColumnName(columnName), x);
}
/**
@@ -1052,7 +1427,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateLong(String columnName, long x) throws SQLException {
- throw Util.notImplemented();
+ updateLong(findColumnName(columnName), x);
}
/**
@@ -1070,7 +1445,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateFloat(String columnName, float x) throws SQLException {
- throw Util.notImplemented();
+ updateFloat(findColumnName(columnName), x);
}
/**
@@ -1088,7 +1463,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateDouble(String columnName, double x) throws SQLException {
- throw Util.notImplemented();
+ updateDouble(findColumnName(columnName), x);
}
/**
@@ -1107,7 +1482,7 @@
*/
public void updateBigDecimal(String columnName, BigDecimal x)
throws SQLException {
- throw Util.notImplemented();
+ updateBigDecimal(findColumnName(columnName), x);
}
/**
@@ -1125,7 +1500,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateString(String columnName, String x) throws SQLException {
- throw Util.notImplemented();
+ updateString(findColumnName(columnName), x);
}
/**
@@ -1143,7 +1518,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateBytes(String columnName, byte x[]) throws SQLException {
- throw Util.notImplemented();
+ updateBytes(findColumnName(columnName), x);
}
/**
@@ -1162,7 +1537,7 @@
*/
public void updateDate(String columnName, java.sql.Date x)
throws SQLException {
- throw Util.notImplemented();
+ updateDate(findColumnName(columnName), x);
}
/**
@@ -1181,7 +1556,7 @@
*/
public void updateTime(String columnName, java.sql.Time x)
throws SQLException {
- throw Util.notImplemented();
+ updateTime(findColumnName(columnName), x);
}
/**
@@ -1200,7 +1575,7 @@
*/
public void updateTimestamp(String columnName, java.sql.Timestamp x)
throws SQLException {
- throw Util.notImplemented();
+ updateTimestamp(findColumnName(columnName), x);
}
/**
@@ -1218,10 +1593,10 @@
* @param length of the stream
* @exception SQLException if a database-access error occurs
*/
- public void updateAsciiStream(String columnName,
+ public void updateAsciiStream(String columnName,
java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ updateAsciiStream(findColumnName(columnName), x, length);
}
/**
@@ -1239,10 +1614,10 @@
* @param length of the stream
* @exception SQLException if a database-access error occurs
*/
- public void updateBinaryStream(String columnName,
+ public void updateBinaryStream(String columnName,
java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ updateBinaryStream(findColumnName(columnName), x, length);
}
/**
@@ -1263,7 +1638,7 @@
public void updateCharacterStream(String columnName,
java.io.Reader reader,
int length) throws SQLException {
- throw Util.notImplemented();
+ updateCharacterStream(findColumnName(columnName), reader, length);
}
/**
@@ -1285,7 +1660,7 @@
*/
public void updateObject(String columnName, Object x, int scale)
throws SQLException {
- throw Util.notImplemented();
+ updateObject(findColumnName(columnName), x, scale);
}
/**
@@ -1303,7 +1678,7 @@
* @exception SQLException if a database-access error occurs
*/
public void updateObject(String columnName, Object x) throws SQLException {
- throw Util.notImplemented();
+ updateObject(findColumnName(columnName), x);
}
/**
@@ -1330,9 +1705,74 @@
* if called when on the insert row
*/
public void updateRow() throws SQLException {
- throw Util.notImplemented();
+ synchronized (getConnectionSynchronization()) {
+ checkResultSetStatus("updateRow", -1);
+ setupContextStack();
+ LanguageConnectionContext lcc = null;
+ StatementContext statementContext = null;
+ try {
+ if (copyOfDatabaseRow == null) //nothing got updated on this row
otherwise we would have copied original row into copyOfDatabaseRow
+ return; //nothing to do since no updates were made to this row
+
+ //now construct the update where current of sql
+ boolean foundOneColumnAlready = false;
+ StringBuffer updateWhereCurrentOfSQL = new StringBuffer("UPDATE ");
+ CursorActivation activation =
getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());
+ ExecCursorTableReference targetTable =
activation.getPreparedStatement().getTargetTable();
+
updateWhereCurrentOfSQL.append(getFullBaseTableName(targetTable));//got the
underlying (schema.)table name
+ updateWhereCurrentOfSQL.append(" SET ");
+ ResultDescription rd = theResults.getResultDescription();
+
+ for (int i=1; i<=rd.getColumnCount(); i++) { //in this for loop we
are constructing columnname=newvalue,... part of the update sql
+ if (columnGotUpdated[i-1]) { //if the column got updated, do
following
+ if (foundOneColumnAlready)
+ updateWhereCurrentOfSQL.append(",");
+
+
updateWhereCurrentOfSQL.append(rd.getColumnDescriptor(i).getName() + "=");
+
+ //Need some special handling depending on the column type
+ if (currentRow.getColumn(i).isNull()) //if new value is
null, there should not be any special handling
+ updateWhereCurrentOfSQL.append("null");
+ else if (currentRow.getColumn(i) instanceof
DateTimeDataValue)
+ updateWhereCurrentOfSQL.append("cast('"+
currentRow.getColumn(i).getString() + "' as " +
currentRow.getColumn(i).getTypeName() + ")");
+ else if (currentRow.getColumn(i) instanceof
StringDataValue)
+ updateWhereCurrentOfSQL.append("'" +
currentRow.getColumn(i).getString() + "'");
+ else if (currentRow.getColumn(i) instanceof BitDataValue) {
+ if
(currentRow.getColumn(i).getTypeName().equals(TypeId.BLOB_NAME))
+ updateWhereCurrentOfSQL.append("cast(X'"+
currentRow.getColumn(i).getString() + "' as " +
currentRow.getColumn(i).getTypeName() + ")");
+ else
+ updateWhereCurrentOfSQL.append("X'" +
currentRow.getColumn(i).getString() + "'");
+ } else
+
updateWhereCurrentOfSQL.append(currentRow.getColumn(i).getObject());
+ foundOneColumnAlready = true;
+ }
+ }
+ //using quotes around the cursor name to preserve case sensitivity
+ updateWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" +
getCursorName() + "\"");
+
+ lcc = getEmbedConnection().getLanguageConnection();
+ statementContext = lcc.pushStatementContext(isAtomic,
updateWhereCurrentOfSQL.toString(), null, false);
+ org.apache.derby.iapi.sql.PreparedStatement ps =
lcc.prepareInternalStatement(updateWhereCurrentOfSQL.toString());
+ org.apache.derby.iapi.sql.ResultSet rs = ps.execute(lcc, true);
//execute the update where current of sql
+ rs.close();
+ rs.finish();
+ //For forward only resultsets, after a update, the ResultSet will
be positioned right before the next row.
+ rowData = null;
+ currentRow = null;
+ copyOfDatabaseRow = null;
+ columnGotUpdated = null;
+ lcc.popStatementContext(statementContext, null);
+ } catch (StandardException t) {
+ throw closeOnTransactionError(t);
+ } finally {
+ if (statementContext != null)
+ lcc.popStatementContext(statementContext, null);
+ restoreContextStack();
}
+ }
+ }
+
/**
* JDBC 2.0
*
@@ -1344,21 +1784,13 @@
*/
public void deleteRow() throws SQLException {
synchronized (getConnectionSynchronization()) {
- checkIfClosed("deleteRow");
- checkOnRow(); // first make sure there's a current row
+ checkResultSetStatus("deleteRow", -1);
- if (getConcurrency() != JDBC20Translation.CONCUR_UPDATABLE)//if
not updatable resultset, can't issue deleteRow
- throw
Util.generateCsSQLException(SQLState.UPDATABLE_RESULTSET_API_DISALLOWED,
"deleteRow");
-
setupContextStack();
+ //now construct the delete where current of sql
try {
- //in case of autocommit on, if there was an exception which
caused runtime rollback in this transaction prior to this deleteRow,
- //the rollback code will mark the language resultset closed
(it doesn't mark the JDBC ResultSet closed).
- //That is why alongwith the earlier checkIfClosed call in this
method, there is a check for language resultset close as well.
- if (theResults.isClosed())
- throw
Util.generateCsSQLException(SQLState.LANG_RESULT_SET_NOT_OPEN, "deleteRow");
StringBuffer deleteWhereCurrentOfSQL = new
StringBuffer("DELETE FROM ");
- Activation activation =
getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());
+ CursorActivation activation =
getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());
deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get
the underlying (schema.)table name
//using quotes around the cursor name to preserve case
sensitivity
deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" +
getCursorName() + "\"");
@@ -1366,11 +1798,14 @@
LanguageConnectionContext lcc =
getEmbedConnection().getLanguageConnection();
StatementContext statementContext =
lcc.pushStatementContext(isAtomic, deleteWhereCurrentOfSQL.toString(), null,
false);
org.apache.derby.iapi.sql.PreparedStatement ps =
lcc.prepareInternalStatement(deleteWhereCurrentOfSQL.toString());
- org.apache.derby.iapi.sql.ResultSet rs = ps.execute(lcc, true);
+ org.apache.derby.iapi.sql.ResultSet rs = ps.execute(lcc,
true); //execute delete where current of sql
rs.close();
rs.finish();
//For forward only resultsets, after a delete, the ResultSet
will be positioned right before the next row.
rowData = null;
+ currentRow = null;
+ copyOfDatabaseRow = null;
+ columnGotUpdated = null;
lcc.popStatementContext(statementContext, null);
} catch (StandardException t) {
throw closeOnTransactionError(t);
@@ -1428,7 +1863,14 @@
*
*/
public void cancelRowUpdates () throws SQLException {
- throw Util.notImplemented();
+ checkResultSetStatus("cancelRowUpdates", -1);
+ if (copyOfDatabaseRow == null) return; //nothing got updated on this
row so cancelRowUpdates is a no-op in this case.
+
+ currentRow.setRowArray(copyOfDatabaseRow);
+ copyOfDatabaseRow = null;
+ columnGotUpdated = null;
+ //rowData needs to be refreshed with the currentRow otherwise it will
continue to have changes made by updateXXX methods
+ rowData = currentRow.getRowArray();
}
/**
@@ -1816,12 +2258,23 @@
* @param x - the new column value
* @exception SQLException Feature not implemented for now.
*/
- public void updateBlob(int columnIndex, Blob x)
+ public void updateBlob(int columnIndex, Blob x)
throws SQLException
- {
- throw Util.notImplemented();
- }
+ {
+ //before throwing exception for possible data type conversion, we
first want to be sure that this call is
+ //not against a read only resultset and that is why we have the check
here for checkResultSetStatus
+ //rather than wait for updateColumn to handle it.
+ checkResultSetStatus("updateBlob", columnIndex);
+ int colType = getColumnType(columnIndex);
+ if (colType != Types.BLOB)
+ throw dataTypeConversion(columnIndex, "java.sql.Blob");
+ if (x == null)
+ updateNull(columnIndex);
+ else
+ updateBinaryStreamInternal(columnIndex, x.getBinaryStream(), -1,
"updateBlob");
+ }
+
/**
* JDBC 3.0
*
@@ -1837,7 +2290,7 @@
public void updateBlob(String columnName, Blob x)
throws SQLException
{
- throw Util.notImplemented();
+ updateBlob(findColumnName(columnName), x);
}
/**
@@ -1855,7 +2308,18 @@
public void updateClob(int columnIndex, Clob x)
throws SQLException
{
- throw Util.notImplemented();
+ //before throwing exception for possible data type conversion, we
first want to be sure that this call is
+ //not against a read only resultset and that is why we have the check
here for checkResultSetStatus
+ //rather than wait for updateColumn to handle it.
+ checkResultSetStatus("updateClob", columnIndex);
+ int colType = getColumnType(columnIndex);
+ if (colType != Types.CLOB)
+ throw dataTypeConversion(columnIndex, "java.sql.Clob");
+
+ if (x == null)
+ updateNull(columnIndex);
+ else
+ updateCharacterStreamInternal(columnIndex, x.getCharacterStream(),
-1, "updateClob");
}
/**
@@ -1873,7 +2337,7 @@
public void updateClob(String columnName, Clob x)
throws SQLException
{
- throw Util.notImplemented();
+ updateClob(findColumnName(columnName), x);
}
/**
Index: java/engine/org/apache/derby/iapi/reference/SQLState.java
===================================================================
--- java/engine/org/apache/derby/iapi/reference/SQLState.java (revision
151757)
+++ java/engine/org/apache/derby/iapi/reference/SQLState.java (working copy)
@@ -1234,6 +1234,7 @@
String LANG_OBSOLETE_PARAMETERS =
"XCL10.S";
String LANG_DATA_TYPE_SET_MISMATCH =
"XCL12.S";
String LANG_INVALID_PARAM_POSITION =
"XCL13.S";
+ String LANG_INVALID_COLUMN_POSITION =
"XCL14.S";
String LANG_INVALID_COMPARE_TO =
"XCL15.S";
String LANG_RESULT_SET_NOT_OPEN =
"XCL16.S";
String LANG_MISSING_ROW =
"XCL19.S";
@@ -1380,6 +1381,7 @@
//updatable resultset related
String UPDATABLE_RESULTSET_API_DISALLOWED = "XJ083.U";
+ String COLUMN_NOT_FROM_BASE_TABLE = "XJ084.U";
//following are session severity.
String DATABASE_NOT_FOUND = "XJ004.C";
Index: java/engine/org/apache/derby/loc/messages_en.properties
===================================================================
--- java/engine/org/apache/derby/loc/messages_en.properties (revision
151757)
+++ java/engine/org/apache/derby/loc/messages_en.properties (working copy)
@@ -967,6 +967,7 @@
XCL10.S=A PreparedStatement has been recompiled, and the parameters have
changed. If you are using JDBC, you must re-prepare the statement.
XCL12.S=An attempt was made to put a data value of type ''{0}'' into a data
value of type ''{1}''.
XCL13.S=The parameter position ''{0}'' is out of range. The number of
parameters for this prepared statement is ''{1}''.
+XCL14.S=The column position ''{0}'' is out of range. The number of columns
for this ResultSet is ''{1}''.
XCL15.S=A ClassCastException occurred when calling the compareTo() method on
an object ''{0}''. The parameter to compareTo() is of class ''{1}''.
XCL16.S=ResultSet not open, operation ''{0}'' not permitted. Verify that
autocommit is OFF.
XCL17.S=Statement not allowed in this database.
@@ -1081,6 +1082,7 @@
XJ077.S=Got an exception when trying to read the first byte/character of the
Blob/Clob pattern using getBytes/getSubString.
XJ082.U=BLOB/CLOB values are not allowed as method parameters or receiver.
XJ083.U=''{0}'' not allowed because the ResultSet is not an updatable
ResultSet.
+XJ084.U=Column does not correspond to a column in the base table. Can't issue
{0} on this column.
0A000.S=Feature not implemented: {0}.
Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml
(revision 151757)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml
(working copy)
@@ -67,6 +67,7 @@
</classpath>
<include name="${this.dir}/*.java"/>
<exclude name="${this.dir}/declareGlobalTempTableJavaJDBC30.java"/>
+ <exclude name="${this.dir}/updatableResultSet.java"/>
<exclude name="${this.dir}/holdCursorJavaReflection.java"/>
<exclude name="${this.dir}/holdCursorJava.java"/>
<exclude name="${this.dir}/streams.java"/>
@@ -93,6 +94,7 @@
<include name="${this.dir}/holdCursorJava.java"/>
<include name="${this.dir}/streams.java"/>
<include name="${this.dir}/procedureJdbc30.java"/>
+ <include name="${this.dir}/updatableResultSet.java"/>
</javac>
</target>
<target name="compilet3">
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java
(revision 151757)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java
(working copy)
@@ -1,130 +1,328 @@
-/*
-
- Derby - Class org.apache.derbyTesting.functionTests.lang.updatableResultSet
-
- Copyright 2004 The Apache Software Foundation or its licensors, as
applicable.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- */
-
-package org.apache.derbyTesting.functionTests.tests.lang;
-
-import java.sql.CallableStatement;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.Statement;
-import java.sql.SQLException;
-import java.sql.SQLWarning;
-
-import org.apache.derby.tools.ij;
-import org.apache.derby.tools.JDBCDisplayUtil;
-
-/**
- This tests JDBC 2.0 updateable resutlset - deleteRow api
- */
-public class updatableResultSet {
-
- private static Connection conn;
- private static DatabaseMetaData dbmt;
- private static Statement stmt, stmt1;
- private static ResultSet rs;
- private static PreparedStatement pStmt = null;
- private static CallableStatement callStmt = null;
-
- public static void main(String[] args) {
- System.out.println("Start testing delete using JDBC2.0
updateable resultset apis");
-
- try {
- // use the ij utility to read the property file and
- // make the initial connection.
- ij.getPropertyArg(args);
- conn = ij.startJBMS();
-
- setup(true);
-
- System.out.println("---Negative Testl - request for
scroll insensitive updatable resultset will give a read only scroll insensitive
resultset");
- conn.clearWarnings();
- stmt =
conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
- SQLWarning warnings = conn.getWarnings();
- while (warnings != null)
- {
- System.out.println("warnings on connection = "
+ warnings);
- warnings = warnings.getNextWarning();
- }
- conn.clearWarnings();
- System.out.println("requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE
but that is not supported");
- System.out.println("Make sure that we got TYPE_SCROLL_INSENSITIVE? " +
(stmt.getResultSetType() == ResultSet.TYPE_SCROLL_INSENSITIVE));
- System.out.println("Make sure that we got CONCUR_READ_ONLY? " +
(stmt.getResultSetConcurrency() == ResultSet.CONCUR_READ_ONLY));
+/*
+
+ Derby - Class org.apache.derbyTesting.functionTests.lang.updatableResultSet
+
+ Copyright 2004 The Apache Software Foundation or its licensors, as
applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+
+package org.apache.derbyTesting.functionTests.tests.lang;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.Statement;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+
+import org.apache.derby.tools.ij;
+import org.apache.derby.tools.JDBCDisplayUtil;
+import org.apache.derby.iapi.services.info.JVMInfo;
+
+import java.math.BigDecimal;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+
+/**
+ This tests JDBC 2.0 updateable resutlset - deleteRow, updateRow api
+ */
+public class updatableResultSet {
+
+ private static Connection conn;
+ private static DatabaseMetaData dbmt;
+ private static Statement stmt, stmt1;
+ private static ResultSet rs, rs1;
+ private static PreparedStatement pStmt = null;
+ private static CallableStatement callStmt = null;
+
+ //test all the supported SQL datatypes using updateXXX methods
+ private static String[] allSQLTypes =
+ {
+ "SMALLINT",
+ "INTEGER",
+ "BIGINT",
+ "DECIMAL(10,5)",
+ "REAL",
+ "DOUBLE",
+ "CHAR(60)",
+ "VARCHAR(60)",
+ "LONG VARCHAR",
+ "CHAR(2) FOR BIT DATA",
+ "VARCHAR(2) FOR BIT DATA",
+ "LONG VARCHAR FOR BIT DATA",
+ "CLOB(1k)",
+ "DATE",
+ "TIME",
+ "TIMESTAMP",
+ "BLOB(1k)",
+
+ };
+
+ //names for column names to test all the supported SQL datatypes using
updateXXX methods
+ private static String[] ColumnNames =
+ {
+ "SMALLINTCOL",
+ "INTEGERCOL",
+ "BIGINTCOL",
+ "DECIMALCOL",
+ "REALCOL",
+ "DOUBLECOL",
+ "CHARCOL",
+ "VARCHARCOL",
+ "LONGVARCHARCOL",
+ "CHARFORBITCOL",
+ "VARCHARFORBITCOL",
+ "LVARCHARFORBITCOL",
+ "CLOBCOL",
+ "DATECOL",
+ "TIMECOL",
+ "TIMESTAMPCOL",
+ "BLOBCOL",
+
+ };
+
+ //data to test all the supported SQL datatypes using updateXXX methods
+ private static String[][]SQLData =
+ {
+ {"11","22"}, // SMALLINT
+ {"111","1111"}, // INTEGER
+ {"22","222"}, // BIGINT
+ {"3.3","3.33"}, // DECIMAL(10,5)
+ {"4.4","4.44"}, // REAL,
+ {"5.5","5.55"}, // DOUBLE
+ {"'1992-01-06'","'1992'"}, // CHAR(60)
+ {"'1992-01-07'","'1992'"}, //VARCHAR(60)",
+ {"'1992-01-08'","'1992'"}, // LONG VARCHAR
+ {"X'10'","X'10aa'"}, // CHAR(2) FOR BIT DATA
+ {"X'10'","X'10bb'"}, // VARCHAR(2) FOR BIT DATA
+ {"X'10'","X'10cc'"}, //LONG VARCHAR FOR BIT DATA
+ {"'13'","'14'"}, //CLOB(1k)
+ {"'2000-01-01'","'2000-01-01'"}, // DATE
+ {"'15:30:20'","'15:30:20'"}, // TIME
+ {"'2000-01-01 15:30:20'","'2000-01-01 15:30:20'"}, //
TIMESTAMP
+ {"X'1020'","X'10203040'"} // BLOB
+ };
+
+ //used for printing useful messages about the test
+ private static String[] allUpdateXXXNames =
+ {
+ "updateShort",
+ "updateInt",
+ "updateLong",
+ "updateBigDecimal",
+ "updateFloat",
+ "updateDouble",
+ "updateString",
+ "updateAsciiStream",
+ "updateCharacterStream",
+ "updateByte",
+ "updateBytes",
+ "updateBinaryStream",
+ "updateClob",
+ "updateDate",
+ "updateTime",
+ "updateTimestamp",
+ "updateBlob",
+ "updateBoolean",
+ "updateNull",
+ "updateArray",
+ "updateRef"
+
+ };
+
+
+ //I have constructed following table based on if combination of
datatype and updateXXX method would work or not.
+ public static final String[][] updateXXXRulesTable = {
+
+ // Types. u u u u u u u u u u u u u u u u u u
u u u
+ // p p p p p p p p p p p p p p p p p
p p p p
+ // d d d d d d d d d d d d d d d d d
d d d d
+ // a a a a a a a a a a a a a a a a a a
a a a
+ // t t t t t t t t t t t t t t t t t t
t t t
+ // e e e e e e e e e e e e e e e e e e
e e e
+ // S I L B F D S A C B B B C D T T B B
N A R
+ // h n o i l o t s h y y i l a i i l
o u r e
+ // o t n g o u r c a t t n o t m m o
o l r f
+ // r g D a b i i r e e a b e e e b
l l a
+ // t e t l n i c s r s
e y
+ // c e g S t y t
a
+ // i t e S a
n
+ // m r r t m
+ // a e S r p
+ // l a t e
+ // m r a
+ // e m
+ // a
+ // m
+/* 0 SMALLINT */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 1 INTEGER */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 2 BIGINT */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 3 DECIMAL */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 4 REAL */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 5 DOUBLE */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 6 CHAR */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "PASS", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "PASS",
"PASS", "PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 7 VARCHAR */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "PASS", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "PASS",
"PASS", "PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 8 LONGVARCHAR */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "PASS", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 9 CHAR FOR BIT */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "PASS", "PASS", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 10 VARCH. BIT */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "PASS", "PASS", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 11 LONGVAR. BIT */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "PASS", "PASS", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 12 CLOB */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "PASS", "PASS", "ERROR", "ERROR", "ERROR", "PASS", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 13 DATE */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "PASS",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 14 TIME */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"PASS", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 15 TIMESTAMP */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 16 BLOB */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "ERROR", "PASS", "ERROR", "ERROR" },
+
+ };
+
+ public static void main(String[] args) {
+ System.out.println("Start testing delete and update using
JDBC2.0 updateable resultset apis");
+
+ try {
+ // use the ij utility to read the property file and
+ // make the initial connection.
+ ij.getPropertyArg(args);
+ conn = ij.startJBMS();
+
+ setup(true);
+
+ System.out.println("---Negative Testl - request for
scroll insensitive updatable resultset will give a read only scroll insensitive
resultset");
+ conn.clearWarnings();
+ stmt =
conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
+ SQLWarning warnings = conn.getWarnings();
+ while (warnings != null)
+ {
+ System.out.println("warnings on connection = "
+ warnings);
+ warnings = warnings.getNextWarning();
+ }
+ conn.clearWarnings();
+ System.out.println("requested TYPE_SCROLL_INSENSITIVE,
CONCUR_UPDATABLE but that is not supported");
+ System.out.println("Make sure that we got
TYPE_SCROLL_INSENSITIVE? " + (stmt.getResultSetType() ==
ResultSet.TYPE_SCROLL_INSENSITIVE));
+ System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (stmt.getResultSetConcurrency() ==
ResultSet.CONCUR_READ_ONLY));
dbmt = conn.getMetaData();
-
System.out.println("ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? "
+ dbmt.ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
-
System.out.println("othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)?
" + dbmt.othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
-
System.out.println("deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? " +
dbmt.deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE));
+
System.out.println("ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? "
+ dbmt.ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
+
System.out.println("othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)?
" + dbmt.othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
+
System.out.println("deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? " +
dbmt.deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE));
System.out.println("JDBC 2.0 updatable resultset api
will fail on this resultset because this is not an updatable resultset");
- rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
- rs.next();
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because Derby does not yet support scroll insensitive updatable
resultsets");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("XJ083"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
- rs.next();
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Negative Test2 - request for
scroll sensitive updatable resultset will give a read only scroll insensitive
resultset");
- stmt =
conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
- while (warnings != null)
- {
- System.out.println("warnings on connection = "
+ warnings);
- warnings = warnings.getNextWarning();
- }
- conn.clearWarnings();
- System.out.println("requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE
but that is not supported");
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because Derby does not yet support scroll insensitive updatable
resultsets");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because Derby does not yet support scroll insensitive updatable
resultsets");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ rs.next();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Negative Test2 - request for
scroll sensitive updatable resultset will give a read only scroll insensitive
resultset");
+ stmt =
conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
+ while (warnings != null)
+ {
+ System.out.println("warnings on connection = "
+ warnings);
+ warnings = warnings.getNextWarning();
+ }
+ conn.clearWarnings();
+ System.out.println("requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE
but that is not supported");
System.out.println("Make sure that we got TYPE_SCROLL_INSENSITIVE? " +
(stmt.getResultSetType() == ResultSet.TYPE_SCROLL_INSENSITIVE));
System.out.println("Make sure that we got CONCUR_READ_ONLY? " +
(stmt.getResultSetConcurrency() == ResultSet.CONCUR_READ_ONLY));
System.out.println("JDBC 2.0 updatable resultset api
will fail on this resultset because this is not an updatable resultset");
- rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
- rs.next();
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because Derby does not yet support scroll sensitive updatable
resultsets");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("XJ083"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
- rs.next();//make sure rs.next() does not fail because
of earlier deleteRow
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Negative Test3 - request a read
only resultset and attempt deleteRow on it");
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because Derby does not yet support scroll sensitive updatable
resultsets");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because Derby does not yet support scroll sensitive updatable
resultsets");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ rs.next();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Negative Test3 - request a read
only resultset and attempt deleteRow and updateRow on it");
+ stmt = conn.createStatement();//the default is a read
only forward only resultset
+ rs = stmt.executeQuery("select * from t1");
+ System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
+ rs.next();
+ System.out.println("Now attempting to send a deleteRow on a read only
resultset.");
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because this is a read only resultset");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Now attempting to send an updateRow on a read only
resultset.");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because this is a read only resultset");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Negative Test4 - request a read
only resultset and send a sql with FOR UPDATE clause and attempt
deleteRow/updateRow on it");
stmt = conn.createStatement();//the default is a read
only forward only resultset
- rs = stmt.executeQuery("select * from t1");
+ rs = stmt.executeQuery("select * from t1 FOR UPDATE");
System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
rs.next();
- System.out.println("Now attempting to send a deleteRow on a read only
resultset.");
+ System.out.println("Now attempting to send a deleteRow on a read only
resultset with FOR UPDATE clause in the SELECT sql.");
try {
rs.deleteRow();
System.out.println("FAIL!!! deleteRow should
have failed because this is a read only resultset");
@@ -135,18 +333,10 @@
else
dumpSQLExceptions(e);
}
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Negative Test4 - request a read
only resultset and send a sql with FOR UPDATE clause and attempt deleteRow on
it");
- stmt = conn.createStatement();//the default is a read
only forward only resultset
- rs = stmt.executeQuery("select * from t1 FOR UPDATE");
- System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
- rs.next();
- System.out.println("Now attempting to send a deleteRow on a read only
resultset with FOR UPDATE clause in the SELECT sql.");
+ System.out.println("Now attempting to send a updateRow on a read only
resultset with FOR UPDATE clause in the SELECT sql.");
try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because this is a read only resultset");
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because this is a read only resultset");
}
catch (SQLException e) {
if (e.getSQLState().equals("XJ083"))
@@ -156,7 +346,7 @@
}
//have to close the resultset because by default,
resultsets are held open over commit
rs.close();
-
+
System.out.println("---Negative Test5 - request
updatable resultset for sql with no FOR UPDATE clause");
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery("select * from t1");//notice
that we forgot to give mandatory FOR UPDATE clause for updatable resultset
@@ -180,12 +370,23 @@
else
dumpSQLExceptions(e);
}
+ System.out.println("Now attempting to send a updateRow on a sql with no
FOR UPDATE clause.");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed on sql with no FOR UPDATE clause");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
//have to close the resultset because by default,
resultsets are held open over commit
rs.close();
-
- System.out.println("---Negative Test6 - request
updatable resultset for sql with FOR READ ONLY clause");
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("select * from t1 FOR READ
ONLY");
+
+ System.out.println("---Negative Test6 - request
updatable resultset for sql with FOR READ ONLY clause");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("select * from t1 FOR READ
ONLY");
System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
warnings = rs.getWarnings();
while (warnings != null)
@@ -196,122 +397,176 @@
rs.clearWarnings();
rs.next();
System.out.println("Now attempting to send a delete on a sql with FOR
READ ONLY clause.");
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed on sql with FOR READ ONLY clause");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("XJ083"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed on sql with FOR READ ONLY clause");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Now attempting to send a updateRow on a sql with FOR
READ ONLY clause.");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed on sql with FOR READ ONLY clause");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
//have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Negative Test7 - attempt to
deleteRow on updatable resultset when the resultset is not positioned on a
row");
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
- System.out.println("Make sure that we got
CONCUR_UPDATABLE? " + (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE));
+ rs.close();
+
+ System.out.println("---Negative Test7 - attempt to
deleteRow & updateRow on updatable resultset when the resultset is not
positioned on a row");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
+ System.out.println("Make sure that we got
CONCUR_UPDATABLE? " + (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE));
System.out.println("Now attempt a deleteRow without first doing next on
the resultset.");
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because resultset is not on a row");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("24000"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because resultset is not on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Now attempt a updateRow without first doing next on
the resultset.");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because resultset is not on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
while (rs.next());//read all the rows from the
resultset and position after the last row
- System.out.println("ResultSet is positioned after the last row. attempt
to deleteRow at this point should fail!");
+ System.out.println("ResultSet is positioned after the last row. attempt
to deleteRow at this point should fail!");
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because resultset is after the last row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("ResultSet is positioned after the last row. attempt
to updateRow at this point should fail!");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because resultset is after the last row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ rs.close();
+
+ System.out.println("---Negative Test8 - attempt
deleteRow & updateRow on updatable resultset after closing the resultset");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
+ System.out.println("Make sure that we got
CONCUR_UPDATABLE? " + (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE));
+ rs.next();
+ rs.close();
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because resultset is closed");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XCL16"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because resultset is closed");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XCL16"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+
+ System.out.println("---Negative Test9 - try updatable
resultset on system table");
+ try {
+ rs = stmt.executeQuery("SELECT * FROM
sys.systables FOR UPDATE");
+ System.out.println("FAIL!!! trying to open an
updatable resultset on a system table should have failed because system tables
can't be updated by a user");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("42Y90"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+
+ System.out.println("---Negative Test10 - try updatable
resultset on a view");
+ try {
+ rs = stmt.executeQuery("SELECT * FROM v1 FOR
UPDATE");
+ System.out.println("FAIL!!! trying to open an
updatable resultset on a view should have failed because Derby doesnot support
updates to views yet");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("42Y90"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ stmt.executeUpdate("drop view v1");
+
+ System.out.println("---Negative Test11 - attempt to
open updatable resultset when there is join in the select query should fail");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ try {
+ rs = stmt.executeQuery("SELECT c1 FROM t1,t2
where t1.c1 = t2.c21 FOR UPDATE");
+ System.out.println("FAIL!!! trying to open an
updatable resultset should have failed because updatable resultset donot
support join in the select query");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("42Y90"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+
+ System.out.println("---Negative Test12 - With
autocommit on, attempt to drop a table when there is an open updatable
resultset on it");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
+ rs.next();
+ System.out.println("Opened an updatable resultset. Now
trying to drop that table through another Statement");
+ stmt1 = conn.createStatement();
+ try {
+ stmt1.executeUpdate("drop table t1");
+ System.out.println("FAIL!!! drop table should
have failed because the updatable resultset is still open");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("X0X95")){
+ System.out.println("expected exception
" + e.getMessage());
+ } else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Since autocommit is on, the drop
table exception resulted in a runtime rollback causing updatable resultset
object to close");
try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because resultset is after the last row");
+ rs.updateRow();
+ System.out.println("FAIL!!! resultset should
have been closed at this point and updateRow should have failed");
}
catch (SQLException e) {
- if (e.getSQLState().equals("24000"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
- rs.close();
-
- System.out.println("---Negative Test8 - attempt
deleteRow on updatable resultset after closing the resultset");
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
- System.out.println("Make sure that we got
CONCUR_UPDATABLE? " + (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE));
- rs.next();
- rs.close();
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because resultset is closed");
- }
- catch (SQLException e) {
if (e.getSQLState().equals("XCL16"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
-
- System.out.println("---Negative Test9 - try updatable
resultset on system table");
- try {
- rs = stmt.executeQuery("SELECT * FROM
sys.systables FOR UPDATE");
- System.out.println("FAIL!!! trying to open an
updatable resultset on a system table should have failed because system tables
can't be updated by a user");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("42Y90"))
System.out.println("expected exception
" + e.getMessage());
else
dumpSQLExceptions(e);
}
-
- System.out.println("---Negative Test10 - try updatable
resultset on a view");
- try {
- rs = stmt.executeQuery("SELECT * FROM v1 FOR
UPDATE");
- System.out.println("FAIL!!! trying to open an
updatable resultset on a view should have failed because Derby doesnot support
updates to views yet");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("42Y90"))
- System.out.println("expected exception
" + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
- stmt.executeUpdate("drop view v1");
-
- System.out.println("---Negative Test11 - attempt to
open updatable resultset when there is join in the select query should fail");
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- try {
- rs = stmt.executeQuery("SELECT c1 FROM t1,t2
where t1.c1 = t2.c21 FOR UPDATE");
- System.out.println("FAIL!!! trying to open an
updatable resultset should have failed because updatable resultset donot
support join in the select query");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("42Y90"))
- System.out.println("expected exception
" + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
-
- System.out.println("---Negative Test12 - With
autocommit on, attempt to drop a table when there is an open updatable
resultset on it");
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
- rs.next();
- System.out.println("Opened an updatable resultset. Now
trying to drop that table through another Statement");
- stmt1 = conn.createStatement();
- try {
- stmt1.executeUpdate("drop table t1");
- System.out.println("FAIL!!! drop table should
have failed because the updatable resultset is still open");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("X0X95")) {
- System.out.println("expected exception
" + e.getMessage());
- } else
- dumpSQLExceptions(e);
- }
- System.out.println("Since autocommit is on, the drop
table exception resulted in a runtime rollback causing updatable resultset
object to close");
- try {
+
try {
rs.deleteRow();
+ System.out.println("FAIL!!! resultset should
have been closed at this point and deleteRow should have failed");
}
catch (SQLException e) {
if (e.getSQLState().equals("XCL16"))
@@ -319,22 +574,50 @@
else
dumpSQLExceptions(e);
}
-
- System.out.println("---Negative Test13 - foreign key
constraint failure will cause deleteRow to fail");
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT 1, 2 FROM tableWithPrimaryKey FOR
UPDATE");
- rs.next();
+
+ System.out.println("---Negative Test13 - foreign key
constraint failure will cause deleteRow to fail");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM tableWithPrimaryKey FOR
UPDATE");
+ rs.next();
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because it will cause foreign key constraint failure");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("23503"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Since autocommit is on, the
constraint exception resulted in a runtime rollback causing updatable resultset
object to close");
try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because it will cause foreign key constraint failure");
+ rs.next();
+ System.out.println("FAIL!!! next should have
failed because foreign key constraint failure resulted in a runtime rollback");
}
catch (SQLException e) {
- if (e.getSQLState().equals("23503"))
+ if (e.getSQLState().equals("XCL16"))
System.out.println("expected exception
" + e.getMessage());
else
dumpSQLExceptions(e);
}
- System.out.println("Since autocommit is on, the
constraint exception resulted in a runtime rollback causing updatable resultset
object to close");
+
+ System.out.println("---Negative Test14 - foreign key
constraint failure will cause updateRow to fail");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT c1, c2 FROM tableWithPrimaryKey FOR
UPDATE");
+ rs.next();
+ rs.updateInt(1,11);
+ rs.updateInt(2,22);
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because it will cause foreign key constraint failure");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("23503"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Since autocommit is on, the
constraint exception resulted in a runtime rollback causing updatable resultset
object to close");
try {
rs.next();
System.out.println("FAIL!!! next should have
failed because foreign key constraint failure resulted in a runtime rollback");
@@ -345,25 +628,56 @@
else
dumpSQLExceptions(e);
}
-
- System.out.println("---Positive Test1 - request
updatable resultset for forward only type resultset");
+
+ System.out.println("---Negative Test15 - Can't call
updateXXX methods on columns that do not correspond to a column in the table");
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- warnings = conn.getWarnings();
- while (warnings != null)
- {
- System.out.println("warnings = " + warnings);
- warnings = warnings.getNextWarning();
- }
- System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
- System.out.println("got TYPE_FORWARD_ONLY? " + (stmt.getResultSetType()
== ResultSet.TYPE_FORWARD_ONLY));
- System.out.println("got CONCUR_UPDATABLE? " +
(stmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE));
- rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
- System.out.println("JDBC 2.0 updatable resultset apis
on this ResultSet object will pass because this is an updatable resultset");
- rs.next();
- System.out.println("column 1 on this row before deleteRow is " +
rs.getInt(1));
- System.out.println("column 2 on this row before deleteRow is " +
rs.getString(2));
- rs.deleteRow();
- System.out.println("Since after deleteRow(), ResultSet is positioned
before the next row, getXXX will fail");
+ rs = stmt.executeQuery("SELECT 1, 2 FROM tableWithPrimaryKey FOR
UPDATE");
+ rs.next();
+ try {
+ rs.updateInt(1,22);
+ System.out.println("FAIL!!! updateInt should
have failed because it is trying to update a column that does not correspond to
column in base table");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ084"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+
+ System.out.println("---Negative Test16 - Call updateXXX
method on out of the range column");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT c1, c2 FROM t1 FOR UPDATE");
+ rs.next();
+ System.out.println("There are only 2 columns in the
select list and we are trying to send updateXXX on column position 3");
+ try {
+ rs.updateInt(3,22);
+ System.out.println("FAIL!!! updateInt should
have failed because there are only 2 columns in the select list");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XCL14"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+
+ System.out.println("---Positive Test1a - request
updatable resultset for forward only type resultset");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ warnings = conn.getWarnings();
+ while (warnings != null)
+ {
+ System.out.println("Unexpected warnings = " +
warnings);
+ warnings = warnings.getNextWarning();
+ }
+ System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
+ System.out.println("got TYPE_FORWARD_ONLY? " + (stmt.getResultSetType()
== ResultSet.TYPE_FORWARD_ONLY));
+ System.out.println("got CONCUR_UPDATABLE? " +
(stmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE));
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ System.out.println("JDBC 2.0 updatable resultset apis
on this ResultSet object will pass because this is an updatable resultset");
+ rs.next();
+ System.out.println("column 1 on this row before deleteRow is " +
rs.getInt(1));
+ System.out.println("column 2 on this row before deleteRow is " +
rs.getString(2));
+ rs.deleteRow();
+ System.out.println("Since after deleteRow(), ResultSet is positioned
before the next row, getXXX will fail");
try {
System.out.println("column 1 on this deleted
row is " + rs.getInt(1));
}
@@ -373,10 +687,44 @@
else
dumpSQLExceptions(e);
}
- System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
+ System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because ResultSet is not positioned on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Position the ResultSet with next()");
+ rs.next();
+ System.out.println("Should be able to deletRow() on the current row
now");
+ rs.deleteRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test1b - request
updatable resultset for forward only type resultset");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ warnings = conn.getWarnings();
+ while (warnings != null)
+ {
+ System.out.println("Unexpected warnings = " +
warnings);
+ warnings = warnings.getNextWarning();
+ }
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row before updateInt is " +
rs.getInt(1));
+ rs.updateInt(1,234);
+ System.out.println("column 1 on this row after updateInt is " +
rs.getInt(1));
+ System.out.println("column 2 on this row before updateString is " +
rs.getString(2));
+ System.out.println("now updateRow on the row");
+ rs.updateRow();
+ System.out.println("Since after updateRow(), ResultSet is positioned
before the next row, getXXX will fail");
try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because it can't be called more than once on the same row");
+ System.out.println("column 1 on this updateRow
row is " + rs.getInt(1));
}
catch (SQLException e) {
if (e.getSQLState().equals("24000"))
@@ -384,38 +732,50 @@
else
dumpSQLExceptions(e);
}
- System.out.println("Position the ResultSet with next()");
- rs.next();
- System.out.println("Should be able to deletRow() on the current row
now");
- rs.deleteRow();
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Positive Test2 - even if no
columns from table specified in the column list, we should be able to get
updatable resultset");
- reloadData();
- System.out.println("total number of rows in T1 ");
+ System.out.println("calling updateRow again w/o first positioning the
ResultSet on the next row will fail");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because ResultSet is not positioned on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Position the ResultSet with next()");
+ rs.next();
+ System.out.println("Should be able to updateRow() on the current row
now");
+ rs.updateString(2,"234");
+ rs.updateRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test2 - even if no
columns from table specified in the column list, we should be able to get
updatable resultset");
+ reloadData();
+ System.out.println("total number of rows in T1 ");
dumpRS(stmt.executeQuery("select count(*) from t1"));
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
- rs.next();
- System.out.println("column 1 on this row is " + rs.getInt(1));
- rs.deleteRow();
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
- System.out.println("total number of rows in T1 after one deleteRow is ");
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row is " + rs.getInt(1));
+ rs.deleteRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+ System.out.println("total number of rows in T1 after one deleteRow is ");
dumpRS(stmt.executeQuery("select count(*) from t1"));
-
- System.out.println("---Positive Test3 - use prepared
statement with concur updatable status");
- reloadData();
- pStmt = conn.prepareStatement("select * from t1 where
c1>? for update", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
- System.out.println("got TYPE_FORWARD_ONLY? " +
(pStmt.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY));
- System.out.println("got CONCUR_UPDATABLE? " +
(pStmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE));
- pStmt.setInt(1,0);
- rs = pStmt.executeQuery();
- rs.next();
- System.out.println("column 1 on this row is " + rs.getInt(1));
- rs.deleteRow();
- System.out.println("Since after deleteRow(), ResultSet is positioned
before the next row, getXXX will fail");
+
+ System.out.println("---Positive Test3a - use prepared
statement with concur updatable status to test deleteRow");
+ reloadData();
+ pStmt = conn.prepareStatement("select * from t1 where
c1>? for update", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
+ System.out.println("got TYPE_FORWARD_ONLY? " +
(pStmt.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY));
+ System.out.println("got CONCUR_UPDATABLE? " +
(pStmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE));
+ pStmt.setInt(1,0);
+ rs = pStmt.executeQuery();
+ rs.next();
+ System.out.println("column 1 on this row is " + rs.getInt(1));
+ rs.deleteRow();
+ System.out.println("Since after deleteRow(), ResultSet is positioned
before the next row, getXXX will fail");
try {
System.out.println("column 1 on this deleted
row is " + rs.getInt(1));
}
@@ -426,9 +786,39 @@
dumpSQLExceptions(e);
}
System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because it can't be called more than once on the same row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Position the ResultSet with next()");
+ rs.next();
+ System.out.println("Should be able to deletRow() on the current row
now");
+ rs.deleteRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test3b - use prepared
statement with concur updatable status to test updateXXX");
+ reloadData();
+ pStmt = conn.prepareStatement("select * from t1 where
c1>? for update", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
+ System.out.println("got TYPE_FORWARD_ONLY? " +
(pStmt.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY));
+ System.out.println("got CONCUR_UPDATABLE? " +
(pStmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE));
+ pStmt.setInt(1,0);
+ rs = pStmt.executeQuery();
+ rs.next();
+ System.out.println("column 1 on this row is " + rs.getInt(1));
+ rs.updateInt(1,5);
+ System.out.println("column 1 on this row after updateInt is " +
rs.getInt(1));
+ rs.updateRow();
+ System.out.println("Since after updateRow(), ResultSet is positioned
before the next row, getXXX will fail");
try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because it can't be called more than once on the same row");
+ System.out.println("column 1 on this updated
row is " + rs.getInt(1));
}
catch (SQLException e) {
if (e.getSQLState().equals("24000"))
@@ -436,25 +826,55 @@
else
dumpSQLExceptions(e);
}
- System.out.println("Position the ResultSet with next()");
- rs.next();
- System.out.println("Should be able to deletRow() on the current row
now");
- rs.deleteRow();
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Positive Test4 - use callable
statement with concur updatable status");
- reloadData();
- callStmt = conn.prepareCall("select * from t1 for
update", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = callStmt.executeQuery();
- System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
- System.out.println("got TYPE_FORWARD_ONLY? " +
(callStmt.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY));
- System.out.println("got CONCUR_UPDATABLE? " +
(callStmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE));
- rs.next();
- System.out.println("row not deleted yet. Confirm with rs.rowDeleted()? "
+ rs.rowDeleted());
- System.out.println("column 1 on this row is " + rs.getInt(1));
- rs.deleteRow();
- System.out.println("Since after deleteRow(), ResultSet is positioned
before the next row, getXXX will fail");
+ System.out.println("calling updateRow/updateXXX again w/o first
positioning the ResultSet on the next row will fail");
+ try {
+ rs.updateInt(1,0);
+ System.out.println("FAIL!!! updateXXX should
have failed because resultset is not positioned on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because resultset is not positioned on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ try {
+ rs.cancelRowUpdates();
+ System.out.println("FAIL!!! cancelRowUpdates
should have failed because resultset is not positioned on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Position the ResultSet with next()");
+ rs.next();
+ System.out.println("Should be able to cancelRowUpdates() on the current
row now");
+ rs.cancelRowUpdates();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test4 - use callable
statement with concur updatable status");
+ reloadData();
+ callStmt = conn.prepareCall("select * from t1 for
update", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = callStmt.executeQuery();
+ System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
+ System.out.println("got TYPE_FORWARD_ONLY? " +
(callStmt.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY));
+ System.out.println("got CONCUR_UPDATABLE? " +
(callStmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE));
+ rs.next();
+ System.out.println("column 1 on this row is " + rs.getInt(1));
+ rs.deleteRow();
+ System.out.println("Since after deleteRow(), ResultSet is positioned
before the next row, getXXX will fail");
try {
System.out.println("column 1 on this deleted
row is " + rs.getInt(1));
}
@@ -465,41 +885,44 @@
dumpSQLExceptions(e);
}
System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because it can't be called more than once on the same row");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("24000"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- dumpSQLExceptions(e);
- }
- System.out.println("Position the ResultSet with next()");
- rs.next();
- System.out.println("Should be able to deletRow() on the current row
now");
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow should
have failed because it can't be called more than once on the same row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Position the ResultSet with next()");
+ rs.next();
+ System.out.println("Should be able to deletRow() on the current row
now");
rs.deleteRow();
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Positive Test5 - donot have to
select primary key to get an updatable resultset");
- reloadData();
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT c32 FROM t3 FOR UPDATE");
- rs.next();
- System.out.println("column 1 on this row is " + rs.getInt(1));
- System.out.println("now try to delete row when primary key is not
selected for that row");
- rs.deleteRow();
- //have to close the resultset because by default,
resultsets are held open over commit
- rs.close();
-
- System.out.println("---Positive Test6 - For Forward
Only resultsets, DatabaseMetaData will return false for ownDeletesAreVisible
and deletesAreDetected");
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test5 - donot have to
select primary key to get an updatable resultset");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT c32 FROM t3 FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row is " + rs.getInt(1));
+ System.out.println("now try to delete row when primary key is not
selected for that row");
+ rs.deleteRow();
+ rs.next();
+ rs.updateLong(1,123);
+ rs.updateRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test6a - For Forward
Only resultsets, DatabaseMetaData will return false for ownDeletesAreVisible
and deletesAreDetected");
System.out.println("---This is because, after
deleteRow, we position the ResultSet before the next row. We don't make a hole
for the deleted row and then stay on that deleted hole");
- dbmt = conn.getMetaData();
- System.out.println("ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? "
+ dbmt.ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY));
-
System.out.println("othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? " +
dbmt.othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY));
- System.out.println("deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? " +
dbmt.deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY));
- reloadData();
+ dbmt = conn.getMetaData();
+ System.out.println("ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? "
+ dbmt.ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY));
+
System.out.println("othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? " +
dbmt.othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY));
+ System.out.println("deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? " +
dbmt.deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY));
+ reloadData();
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
rs.next();
@@ -509,116 +932,233 @@
rs.deleteRow();
System.out.println("Have this call to rs.rowDeleted() just to make sure
the method does always return false? " + rs.rowDeleted());
rs.close();
-
- System.out.println("---Positive Test7 - delete using
updatable resultset api from a temporary table");
+
+ System.out.println("---Positive Test6b - For Forward
Only resultsets, DatabaseMetaData will return false for ownUpdatesAreVisible
and updatesAreDetected");
+ System.out.println("---This is because, after
updateRow, we position the ResultSet before the next row");
+ dbmt = conn.getMetaData();
+ System.out.println("ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? "
+ dbmt.ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY));
+
System.out.println("othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? " +
dbmt.othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY));
+ System.out.println("updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? " +
dbmt.updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY));
+ reloadData();
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- stmt.executeUpdate("DECLARE GLOBAL TEMPORARY TABLE
SESSION.t2(c21 int, c22 int) on commit preserve rows not logged");
- stmt.executeUpdate("insert into SESSION.t2 values(21,
1)");
- stmt.executeUpdate("insert into SESSION.t2 values(22,
1)");
- System.out.println("following rows in temp table before
deleteRow");
- dumpRS(stmt.executeQuery("select * from SESSION.t2"));
- rs = stmt.executeQuery("select c21 from session.t2 for
update");
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE of c1");
rs.next();
- rs.deleteRow();
- rs.next();
- rs.deleteRow();
- System.out.println("As expected, no rows in temp table
after deleteRow");
- dumpRS(stmt.executeQuery("select * from SESSION.t2"));
+ System.out.println("The JDBC program should look at rowUpdated only if
updatesAreDetected returns true");
+ System.out.println("Since Derby returns false for updatesAreDetected for
FORWARD_ONLY updatable resultset,the program should not rely on rs.rowUpdated()
for FORWARD_ONLY updatable resultsets");
+ System.out.println("Have this call to rs.rowUpdated() just to make sure
the method does always return false? " + rs.rowUpdated());
+ rs.updateLong(1,123);
+ rs.updateRow();
+ System.out.println("Have this call to rs.rowUpdated() just to make sure
the method does always return false? " + rs.rowUpdated());
rs.close();
- stmt.executeUpdate("DROP TABLE SESSION.t2");
-
- System.out.println("---Positive Test8 - change the name
of the resultset and see if deleteRow still works");
- reloadData();
+
+ System.out.println("---Positive Test7a - delete using
updatable resultset api from a temporary table");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt.executeUpdate("DECLARE GLOBAL TEMPORARY TABLE
SESSION.t2(c21 int, c22 int) on commit preserve rows not logged");
+ stmt.executeUpdate("insert into SESSION.t2 values(21,
1)");
+ stmt.executeUpdate("insert into SESSION.t2 values(22,
1)");
+ System.out.println("following rows in temp table before
deleteRow");
+ dumpRS(stmt.executeQuery("select * from SESSION.t2"));
+ rs = stmt.executeQuery("select c21 from session.t2 for
update");
+ rs.next();
+ rs.deleteRow();
+ rs.next();
+ rs.deleteRow();
+ System.out.println("As expected, no rows in temp table
after deleteRow");
+ dumpRS(stmt.executeQuery("select * from SESSION.t2"));
+ rs.close();
+ stmt.executeUpdate("DROP TABLE SESSION.t2");
+
+ System.out.println("---Positive Test7b - update using
updatable resultset api from a temporary table");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt.executeUpdate("DECLARE GLOBAL TEMPORARY TABLE
SESSION.t3(c31 int, c32 int) on commit preserve rows not logged");
+ stmt.executeUpdate("insert into SESSION.t3 values(21,
1)");
+ stmt.executeUpdate("insert into SESSION.t3 values(22,
1)");
+ System.out.println("following rows in temp table before
deleteRow");
+ dumpRS(stmt.executeQuery("select * from SESSION.t3"));
+ rs = stmt.executeQuery("select c31 from session.t3 for
update");
+ rs.next();
+ rs.updateLong(1,123);
+ rs.updateRow();
+ rs.next();
+ rs.updateLong(1,123);
+ rs.updateRow();
+ System.out.println("As expected, updated rows in temp
table after updateRow");
+ dumpRS(stmt.executeQuery("select * from SESSION.t3"));
+ rs.close();
+ stmt.executeUpdate("DROP TABLE SESSION.t3");
+
+ System.out.println("---Positive Test8a - change the
name of the resultset and see if deleteRow still works");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("change the cursor name(case sensitive name) with
setCursorName and then try to deleteRow");
+ stmt.setCursorName("CURSORNOUPDATe");//notice this name
is case sensitive
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
+ rs.next();
+ rs.deleteRow();
+ System.out.println("change the cursor name one more time with
setCursorName and then try to deleteRow");
+ stmt.setCursorName("CURSORNOUPDATE1");
+ rs.next();
+ rs.deleteRow();
+ rs.close();
+
+ System.out.println("---Positive Test8b - change the
name of the resultset and see if updateRow still works");
+ reloadData();
+ System.out.println("change the cursor name one more time with
setCursorName and then try to updateRow");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("change the cursor name(case sensitive name) with
setCursorName and then try to updateRow");
+ stmt.setCursorName("CURSORNOUPDATe");//notice this name
is case sensitive
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE of c1");
+ rs.next();
+ rs.updateLong(1,123);
+ stmt.setCursorName("CURSORNOUPDATE1");
+ rs.updateRow();
+ rs.close();
+
+ System.out.println("---Positive Test9a - using
correlation name for the table in the select sql is not a problem");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 abcde FOR UPDATE of c1");
+ rs.next();
+ System.out.println("column 1 on this row is " + rs.getInt(1));
+ System.out.println("now try to deleteRow");
+ rs.deleteRow();
+ rs.close();
+
+ System.out.println("---Positive Test9b - using
correlation name for column names is not allowed with updateXXX");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("Table t1 has following rows");
+ dumpRS(stmt.executeQuery("select * from t1"));
+ rs = stmt.executeQuery("SELECT c1 as col1, c2 as col2 FROM t1 abcde FOR
UPDATE of c1");
+ rs.next();
+ System.out.println("column 1 on this row is " + rs.getInt(1));
+ try {
+ System.out.println("attempt to send updateXXX
on correlation name column will fail");
+ rs.updateShort(1, (new
Integer(123)).shortValue());
+ System.out.println("FAIL!!! updateXXX should
have failed");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XJ084"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ rs.close();
+ System.out.println("Table t1 after updateRow has following rows");
+ dumpRS(stmt.executeQuery("select * from t1"));
+
+ System.out.println("---Positive Test10 - 2 updatable
resultsets going against the same table, will they conflict?");
+ conn.setAutoCommit(false);
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt1 =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
+ rs.next();
+ rs1 = stmt1.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
+ rs1.next();
+ System.out.println("delete using first resultset");
+ rs.deleteRow();
+ try {
+ System.out.println("attempt to send deleteRow
on the same row through a different resultset should throw an exception");
+ rs1.deleteRow();
+ System.out.println("FAIL!!! delete using second
resultset succedded? ");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XCL08"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Move to next row in the 2nd
resultset and then delete using the second resultset");
+ rs1.next();
+ rs1.deleteRow();
+ rs.close();
+ rs1.close();
+ conn.setAutoCommit(true);
+
+ System.out.println("---Positive Test11 - setting the
fetch size to > 1 will be ignored by updatable resultset. Same as updatable
cursors");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt.executeUpdate("call
SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
+ stmt.setFetchSize(200);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
+ System.out.println("Notice the Fetch Size in run time
statistics output.");
+ showScanStatistics(rs, conn);
+ System.out.println("statement's fetch size is " +
stmt.getFetchSize());
+ rs.close();
+ stmt.executeUpdate("call
SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0)");
+
+ System.out.println("---Positive Test12a - make sure
delete trigger gets fired when deleteRow is issued");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("Verify that before delete trigger
got fired, row count is 0 in deleteTriggerInsertIntoThisTable");
+ dumpRS(stmt.executeQuery("select count(*) from
deleteTriggerInsertIntoThisTable"));
+ rs = stmt.executeQuery("SELECT * FROM
table0WithTriggers FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row is " +
rs.getInt(1));
+ System.out.println("now try to delete row and make sure
that trigger got fired");
+ rs.deleteRow();
+ rs.close();
+ System.out.println("Verify that delete trigger got
fired by verifying the row count to be 1 in deleteTriggerInsertIntoThisTable");
+ dumpRS(stmt.executeQuery("select count(*) from
deleteTriggerInsertIntoThisTable"));
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test12b - make sure
update trigger gets fired when updateRow is issued");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("Verify that before update trigger
got fired, row count is 0 in updateTriggerInsertIntoThisTable");
+ dumpRS(stmt.executeQuery("select count(*) from
updateTriggerInsertIntoThisTable"));
+ rs = stmt.executeQuery("SELECT * FROM
table0WithTriggers FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row is " +
rs.getInt(1));
+ System.out.println("now try to update row and make sure
that trigger got fired");
+ rs.updateLong(1,123);
+ rs.updateRow();
+ rs.close();
+ System.out.println("Verify that update trigger got
fired by verifying the row count to be 1 in updateTriggerInsertIntoThisTable");
+ dumpRS(stmt.executeQuery("select count(*) from
updateTriggerInsertIntoThisTable"));
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ System.out.println("---Positive Test13a - Another test
case for delete trigger");
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- System.out.println("change the cursor name(case sensitive name) with
setCursorName and then try to deleteRow");
- stmt.setCursorName("CURSORNOUPDATe");//notice this name
is case sensitive
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
+ rs = stmt.executeQuery("SELECT * FROM
table1WithTriggers FOR UPDATE");
rs.next();
+ System.out.println("column 1 on this row is " +
rs.getInt(1));
+ System.out.println("this delete row will fire the
delete trigger which will delete all the rows from the table and from the
resultset");
rs.deleteRow();
- System.out.println("change the cursor name one more time with
setCursorName and then try to deleteRow");
- stmt.setCursorName("CURSORNOUPDATE1");
rs.next();
- rs.deleteRow();
- rs.close();
-
- System.out.println("---Positive Test9 - using
correlation name for the table in the select sql is not a problem");
- reloadData();
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 abcde FOR UPDATE of c1");
- rs.next();
- System.out.println("column 1 on this row is " + rs.getInt(1));
- System.out.println("now try to deleteRow");
- rs.deleteRow();
- rs.close();
-
- System.out.println("---Positive Test10 - 2 updatable
resultsets going against the same table, will they conflict?");
- conn.setAutoCommit(false);
- reloadData();
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- stmt1 =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
- rs.next();
- ResultSet rs1 = stmt1.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
- rs1.next();
- System.out.println("delete using first resultset");
- rs.deleteRow();
try {
- System.out.println("attempt to send deleteRow
on the same row through a different resultset should throw an exception");
- rs1.deleteRow();
- System.out.println("FAIL!!! delete using second
resultset succedded? " + rs1.rowDeleted());
+ rs.deleteRow();
+ System.out.println("FAIL!!! there should have
be no more rows in the resultset at this point because delete trigger deleted
all the rows");
}
catch (SQLException e) {
- if (e.getSQLState().equals("XCL08"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
+ if (e.getSQLState().equals("24000")) {
+ System.out.println("expected exception
" + e.getMessage());
+ } else
dumpSQLExceptions(e);
}
- System.out.println("Move to next row in the 2nd
resultset and then delete using the second resultset");
- rs1.next();
- rs1.deleteRow();
rs.close();
- rs1.close();
- conn.setAutoCommit(true);
-
- System.out.println("---Positive Test11 - setting the
fetch size to > 1 will be ignored by updatable resultset. Same as updatable
cursors");
- reloadData();
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- stmt.executeUpdate("call
SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
- stmt.setFetchSize(200);
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
- System.out.println("Notice the Fetch Size in run time
statistics output.");
- showScanStatistics(rs, conn);
- System.out.println("statement's fetch size is " +
stmt.getFetchSize());
- rs.close();
- stmt.executeUpdate("call
SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0)");
-
- System.out.println("---Positive Test12 - make sure
delete trigger gets fired when deleteRow is issued");
- reloadData();
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- System.out.println("Verify that before delete trigger
got fired, row count is 0 in deleteTriggerInsertIntoThisTable");
- dumpRS(stmt.executeQuery("select count(*) from
deleteTriggerInsertIntoThisTable"));
- rs = stmt.executeQuery("SELECT * FROM
tableWithDeleteTriggers FOR UPDATE");
- rs.next();
- System.out.println("column 1 on this row is " +
rs.getInt(1));
- System.out.println("now try to delete row and make sure
that trigger got fired");
- rs.deleteRow();
- rs.close();
- System.out.println("Verify that delete trigger got
fired by verifying the row count to be 1 in deleteTriggerInsertIntoThisTable");
- dumpRS(stmt.executeQuery("select count(*) from
deleteTriggerInsertIntoThisTable"));
+ System.out.println("Verify that delete trigger got
fired by verifying the row count to be 0 in table1WithTriggers");
+ dumpRS(stmt.executeQuery("select count(*) from
table1WithTriggers"));
//have to close the resultset because by default,
resultsets are held open over commit
rs.close();
-
- System.out.println("---Positive Test13 - Another test
case for delete trigger");
+
+ System.out.println("---Positive Test13b - Another test
case for update trigger");
+ System.out.println("Look at the current contents of
table2WithTriggers");
+ dumpRS(stmt.executeQuery("select * from
table2WithTriggers"));
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT * FROM
anotherTableWithDeleteTriggers FOR UPDATE");
+ rs = stmt.executeQuery("SELECT * FROM
table2WithTriggers where c1>1 FOR UPDATE");
rs.next();
System.out.println("column 1 on this row is " +
rs.getInt(1));
- System.out.println("this delete row will fire the
delete trigger which will delete all the rows from the table and from the
resultset");
- rs.deleteRow();
+ System.out.println("this update row will fire the
update trigger which will update all the rows in the table to have c1=1 and
hence no more rows will qualify for the resultset");
+ rs.updateLong(1,123);
+ rs.updateRow();
rs.next();
try {
- rs.deleteRow();
- System.out.println("FAIL!!! there should have
be no more rows in the resultset at this point because delete trigger deleted
all the rows");
+ rs.updateRow();
+ System.out.println("FAIL!!! there should have
be no more rows in the resultset at this point because update trigger made all
the rows not qualify for the resultset");
}
catch (SQLException e) {
if (e.getSQLState().equals("24000")) {
@@ -627,12 +1167,13 @@
dumpSQLExceptions(e);
}
rs.close();
- System.out.println("Verify that delete trigger got
fired by verifying the row count to be 0 in anotherTableWithDeleteTriggers");
- dumpRS(stmt.executeQuery("select count(*) from
anotherTableWithDeleteTriggers"));
+ System.out.println("Verify that update trigger got
fired by verifying that all column c1s have value 1 in table2WithTriggers");
+ dumpRS(stmt.executeQuery("select * from
table2WithTriggers"));
//have to close the resultset because by default,
resultsets are held open over commit
rs.close();
-
- System.out.println("---Positive Test14 - make sure self
referential delete cascade works when deleteRow is issued");
+
+ System.out.println("---Positive Test14a - make sure
self referential delete cascade works when deleteRow is issued");
+ dumpRS(stmt.executeQuery("select * from
selfReferencingT1"));
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery("SELECT * FROM selfReferencingT1
FOR UPDATE");
rs.next();
@@ -651,11 +1192,32 @@
dumpSQLExceptions(e);
}
rs.close();
- System.out.println("Verify that delete trigger got
fired by verifying the row count to be 0 in anotherTableWithDeleteTriggers");
+ System.out.println("Verify that delete trigger got
fired by verifying the row count to be 0 in selfReferencingT1");
dumpRS(stmt.executeQuery("select count(*) from
selfReferencingT1"));
//have to close the resultset because by default,
resultsets are held open over commit
rs.close();
-
+
+ System.out.println("---Positive Test14b - make sure
self referential update restrict works when updateRow is issued");
+ dumpRS(stmt.executeQuery("select * from
selfReferencingT2"));
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT * FROM selfReferencingT2
FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row is " +
rs.getString(1));
+ System.out.println("update row should fail because
cascade constraint is update restrict");
+ rs.updateString(1,"e2");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! this update should
have caused violation of foreign key constraint");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("23503")) {
+ System.out.println("expected exception
" + e.getMessage());
+ } else
+ dumpSQLExceptions(e);
+ }
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
System.out.println("---Positive Test15 - With
autocommit off, attempt to drop a table when there is an open updatable
resultset on it");
reloadData();
conn.setAutoCommit(false);
@@ -679,15 +1241,15 @@
rs.close();
conn.setAutoCommit(true);
- System.out.println("---Positive Test16 - Do deleteRow
within a transaction and then rollback the transaction");
+ System.out.println("---Positive Test16a - Do deleteRow
within a transaction and then rollback the transaction");
reloadData();
conn.setAutoCommit(false);
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
System.out.println("Verify that before delete trigger
got fired, row count is 0 in deleteTriggerInsertIntoThisTable");
dumpRS(stmt.executeQuery("select count(*) from
deleteTriggerInsertIntoThisTable"));
- System.out.println("Verify that before deleteRow, row
count is 4 in tableWithDeleteTriggers");
- dumpRS(stmt.executeQuery("select count(*) from
tableWithDeleteTriggers"));
- rs = stmt.executeQuery("SELECT * FROM
tableWithDeleteTriggers FOR UPDATE");
+ System.out.println("Verify that before deleteRow, row
count is 4 in table0WithTriggers");
+ dumpRS(stmt.executeQuery("select count(*) from
table0WithTriggers"));
+ rs = stmt.executeQuery("SELECT * FROM
table0WithTriggers FOR UPDATE");
rs.next();
System.out.println("column 1 on this row is " +
rs.getInt(1));
System.out.println("now try to delete row and make sure
that trigger got fired");
@@ -695,17 +1257,45 @@
rs.close();
System.out.println("Verify that delete trigger got
fired by verifying the row count to be 1 in deleteTriggerInsertIntoThisTable");
dumpRS(stmt.executeQuery("select count(*) from
deleteTriggerInsertIntoThisTable"));
- System.out.println("Verify that deleteRow in
transaction, row count is 3 in tableWithDeleteTriggers");
- dumpRS(stmt.executeQuery("select count(*) from
tableWithDeleteTriggers"));
+ System.out.println("Verify that deleteRow in
transaction, row count is 3 in table0WithTriggers");
+ dumpRS(stmt.executeQuery("select count(*) from
table0WithTriggers"));
//have to close the resultset because by default,
resultsets are held open over commit
rs.close();
conn.rollback();
System.out.println("Verify that after rollback, row
count is back to 0 in deleteTriggerInsertIntoThisTable");
dumpRS(stmt.executeQuery("select count(*) from
deleteTriggerInsertIntoThisTable"));
- System.out.println("Verify that after rollback, row
count is back to 4 in tableWithDeleteTriggers");
- dumpRS(stmt.executeQuery("select count(*) from
tableWithDeleteTriggers"));
+ System.out.println("Verify that after rollback, row
count is back to 4 in table0WithTriggers");
+ dumpRS(stmt.executeQuery("select count(*) from
table0WithTriggers"));
conn.setAutoCommit(true);
+ System.out.println("---Positive Test16b - Do updateRow
within a transaction and then rollback the transaction");
+ reloadData();
+ conn.setAutoCommit(false);
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ System.out.println("Verify that before update trigger
got fired, row count is 0 in updateTriggerInsertIntoThisTable");
+ dumpRS(stmt.executeQuery("select count(*) from
updateTriggerInsertIntoThisTable"));
+ System.out.println("Look at the data in
table0WithTriggers before trigger gets fired");
+ dumpRS(stmt.executeQuery("select * from
table0WithTriggers"));
+ rs = stmt.executeQuery("SELECT * FROM
table0WithTriggers FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row is " +
rs.getInt(1));
+ System.out.println("now try to update row and make sure
that trigger got fired");
+ rs.updateLong(1,123);
+ rs.updateRow();
+ rs.close();
+ System.out.println("Verify that update trigger got
fired by verifying the row count to be 1 in updateTriggerInsertIntoThisTable");
+ dumpRS(stmt.executeQuery("select count(*) from
updateTriggerInsertIntoThisTable"));
+ System.out.println("Verify that new data in
table0WithTriggers");
+ dumpRS(stmt.executeQuery("select * from
table0WithTriggers"));
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+ conn.rollback();
+ System.out.println("Verify that after rollback, row
count is back to 0 in updateTriggerInsertIntoThisTable");
+ dumpRS(stmt.executeQuery("select count(*) from
updateTriggerInsertIntoThisTable"));
+ System.out.println("Verify that after rollback,
table0WithTriggers is back to its original contents");
+ dumpRS(stmt.executeQuery("select * from
table0WithTriggers"));
+ conn.setAutoCommit(true);
+
System.out.println("---Positive Test17 - After
deleteRow, resultset is positioned before the next row");
reloadData();
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
@@ -724,163 +1314,1080 @@
}
rs.close();
- teardown();
+ System.out.println("---Positive Test18 - Test
cancelRowUpdates method as the first updatable ResultSet api on a read-only
resultset");
+ stmt = conn.createStatement();
+ rs = stmt.executeQuery("SELECT * FROM
AllDataTypesForTestingTable");
+ try {
+ rs.cancelRowUpdates();
+ System.out.println("Test failed - should not
have reached here because cancelRowUpdates is being called on a read-only
resultset");
+ } catch (SQLException e) {
+ if (e.getSQLState().equals("XJ083")) {
+ System.out.println("expected exception
" + e.getMessage());
+ } else
+ dumpSQLExceptions(e);
+ }
+ rs.close();
- conn.close();
+ System.out.println("---Positive Test19 - Test updateRow
method as the first updatable ResultSet api on a read-only resultset");
+ stmt = conn.createStatement();
+ rs = stmt.executeQuery("SELECT * FROM
AllDataTypesForTestingTable");
+ rs.next();
+ try {
+ rs.updateRow();
+ System.out.println("Test failed - should not
have reached here because updateRow is being called on a read-only resultset");
+ return;
+ } catch (Throwable e) {
+ System.out.println(" Got expected exception :
" + e.getMessage());
+ }
+ rs.close();
- } catch (Throwable e) {
- System.out.println("FAIL: exception thrown:");
- JDBCDisplayUtil.ShowException(System.out,e);
- }
+ System.out.println("---Positive Test20 - Test updateXXX
methods as the first updatable ResultSet api on a read-only resultset");
+ conn.setAutoCommit(false);
+ stmt = conn.createStatement();
+ for (int updateXXXName = 1; updateXXXName <=
allUpdateXXXNames.length; updateXXXName++) {
+ System.out.println(" Test " +
allUpdateXXXNames[updateXXXName-1] + " on a readonly resultset");
+ for (int indexOrName = 1; indexOrName <= 2;
indexOrName++) {
+ rs = stmt.executeQuery("SELECT * FROM
AllDataTypesForTestingTable");
+ rs.next();
+ rs1 = stmt1.executeQuery("SELECT * FROM
AllDataTypesNewValuesData");
+ rs1.next();
+ if (indexOrName == 1) //test by passing
column position
+ System.out.println(" Using
column position as first parameter to " + allUpdateXXXNames[updateXXXName-1]);
+ else
+ System.out.println(" Using
column name as first parameter to " + allUpdateXXXNames[updateXXXName-1]);
+ try {
+ if (updateXXXName == 1)
{//update column with updateShort methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateShort(1, rs1.getShort(updateXXXName));
+ else //test by
passing column name
+
rs.updateShort(ColumnNames[0], rs1.getShort(updateXXXName));
+ } else if (updateXXXName == 2){
//update column with updateInt methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateInt(1, rs1.getInt(updateXXXName));
+ else //test by
passing column name
+
rs.updateInt(ColumnNames[0], rs1.getInt(updateXXXName));
+ } else if (updateXXXName ==
3){ //update column with updateLong methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateLong(1, rs1.getLong(updateXXXName));
+ else //test by
passing column name
+
rs.updateLong(ColumnNames[0], rs1.getLong(updateXXXName));
+ } else if (updateXXXName == 4){
//update column with updateBigDecimal methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBigDecimal(1, rs1.getBigDecimal(updateXXXName));
+ else //test by
passing column name
+
rs.updateBigDecimal(ColumnNames[0], rs1.getBigDecimal(updateXXXName));
+ } else if (updateXXXName == 5){
//update column with updateFloat methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateFloat(1, rs1.getFloat(updateXXXName));
+ else //test by
passing column name
+
rs.updateFloat(ColumnNames[0], rs1.getFloat(updateXXXName));
+ } else if (updateXXXName == 6){
//update column with updateDouble methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateDouble(1, rs1.getDouble(updateXXXName));
+ else //test by
passing column name
+
rs.updateDouble(ColumnNames[0], rs1.getDouble(updateXXXName));
+ } else if (updateXXXName == 7){
//update column with updateString methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateString(1, rs1.getString(updateXXXName));
+ else //test by
passing column name
+
rs.updateString(ColumnNames[0], rs1.getString(updateXXXName));
+ } else if (updateXXXName == 8){
//update column with updateAsciiStream methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateAsciiStream(1,rs1.getAsciiStream(updateXXXName), 4);
+ else //test by
passing column name
+
rs.updateAsciiStream(ColumnNames[0],rs1.getAsciiStream(updateXXXName), 4);
+ } else if (updateXXXName == 9){
//update column with updateCharacterStream methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateCharacterStream(1,rs1.getCharacterStream(updateXXXName), 4);
+ else //test by
passing column name
+
rs.updateCharacterStream(ColumnNames[0],rs1.getCharacterStream(updateXXXName),
4);
+ } else if (updateXXXName ==
10){ //update column with updateByte methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateByte(1,rs1.getByte(1));
+ else //test by
passing column name
+
rs.updateByte(ColumnNames[0],rs1.getByte(1));
+ } else if (updateXXXName ==
11){ //update column with updateBytes methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBytes(1,rs1.getBytes(updateXXXName));
+ else //test by
passing column name
+
rs.updateBytes(ColumnNames[0],rs1.getBytes(updateXXXName));
+ } else if (updateXXXName ==
12){ //update column with updateBinaryStream methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBinaryStream(1,rs1.getBinaryStream(updateXXXName), 2);
+ else //test by
passing column name
+
rs.updateBinaryStream(ColumnNames[0],rs1.getBinaryStream(updateXXXName), 2);
+ } else if (updateXXXName ==
13){ //update column with updateClob methods
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateClob(1,rs1.getClob(updateXXXName));
+ else //test by
passing column name
+
rs.updateClob(ColumnNames[0],rs1.getClob(updateXXXName));
+ } else if (updateXXXName ==
14){ //update column with updateDate methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateDate(1,rs1.getDate(updateXXXName));
+ else //test by
passing column name
+
rs.updateDate(ColumnNames[0],rs1.getDate(updateXXXName));
+ } else if (updateXXXName ==
15){ //update column with updateTime methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateTime(1,rs1.getTime(updateXXXName));
+ else //test by
passing column name
+
rs.updateTime(ColumnNames[0],rs1.getTime(updateXXXName));
+ } else if (updateXXXName ==
16){ //update column with updateTimestamp methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateTimestamp(1,rs1.getTimestamp(updateXXXName));
+ else //test by
passing column name
+
rs.updateTimestamp(ColumnNames[0],rs1.getTimestamp(updateXXXName));
+ } else if (updateXXXName ==
17){ //update column with updateBlob methods
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBlob(1,rs1.getBlob(updateXXXName));
+ else //test by
passing column name
+
rs.updateBlob(ColumnNames[0],rs1.getBlob(updateXXXName));
+ } else if (updateXXXName ==
18){ //update column with getBoolean methods
+ //use
SHORT sql type column's value for testing boolean since Derby don't support
boolean datatype
+ //Since
Derby does not support Boolean datatype, this method is going to fail with the
syntax error
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBoolean(1, rs1.getBoolean(1));
+ else //test by
passing column name
+
rs.updateBoolean(ColumnNames[0], rs1.getBoolean(1));
+ } else if (updateXXXName ==
19){ //update column with updateNull methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateNull(1);
+ else //test by
passing column name
+
rs.updateNull(ColumnNames[0]);
+ } else if (updateXXXName ==
20){ //update column with updateArray methods - should get not implemented
exception
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateArray(1, null);
+ else //test by
passing column name
+
rs.updateArray(ColumnNames[0], null);
+ } else if (updateXXXName ==
21){ //update column with updateRef methods - should get not implemented
exception
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateRef(1, null);
+ else //test by
passing column name
+
rs.updateRef(ColumnNames[0], null);
+ }
+ System.out.println("Test failed
- should not have reached here because updateXXX is being called on a read-only
resultset");
+ return;
+ } catch (Throwable e) {
+ System.out.println("
Got expected exception : " + e.getMessage());
+ }
+ }
+ }
+ conn.setAutoCommit(true);
- System.out.println("Finished testing updateable resultsets");
- }
+ System.out.println("---Positive Test21 - Test all
updateXXX(excluding updateObject) methods on all the supported sql datatypes");
+ conn.setAutoCommit(false);
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt1 = conn.createStatement();
+ for (int sqlType = 1, checkAgainstColumn = 1; sqlType
<= allSQLTypes.length; sqlType++ ) {
+ System.out.println("Next datatype to test is "
+ allSQLTypes[sqlType-1]);
+ for (int updateXXXName = 1; updateXXXName <=
allUpdateXXXNames.length; updateXXXName++) {
+ checkAgainstColumn = updateXXXName;
+ System.out.println(" Testing " +
allUpdateXXXNames[updateXXXName-1] + " on SQL type " + allSQLTypes[sqlType-1]);
+ for (int indexOrName = 1; indexOrName
<= 2; indexOrName++) {
+ if (indexOrName == 1) //test by
passing column position
+ System.out.println("
Using column position as first parameter to " +
allUpdateXXXNames[updateXXXName-1]);
+ else
+ System.out.println("
Using column name as first parameter to " + allUpdateXXXNames[updateXXXName-1]);
+ rs = stmt.executeQuery("SELECT
* FROM AllDataTypesForTestingTable FOR UPDATE");
+ rs.next();
+ rs1 =
stmt1.executeQuery("SELECT * FROM AllDataTypesNewValuesData");
+ rs1.next();
+ try {
+ if (updateXXXName == 1)
{//update column with updateShort methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateShort(sqlType, rs1.getShort(updateXXXName));
+ else //test by
passing column name
+
rs.updateShort(ColumnNames[sqlType-1], rs1.getShort(updateXXXName));
+ } else if
(updateXXXName == 2){ //update column with updateInt methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateInt(sqlType, rs1.getInt(updateXXXName));
+ else //test by
passing column name
+
rs.updateInt(ColumnNames[sqlType-1], rs1.getInt(updateXXXName));
+ } else if
(updateXXXName == 3){ //update column with updateLong methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateLong(sqlType, rs1.getLong(updateXXXName));
+ else //test by
passing column name
+
rs.updateLong(ColumnNames[sqlType-1], rs1.getLong(updateXXXName));
+ } else if
(updateXXXName == 4){ //update column with updateBigDecimal methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBigDecimal(sqlType, rs1.getBigDecimal(updateXXXName));
+ else //test by
passing column name
+
rs.updateBigDecimal(ColumnNames[sqlType-1], rs1.getBigDecimal(updateXXXName));
+ } else if
(updateXXXName == 5){ //update column with updateFloat methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateFloat(sqlType, rs1.getFloat(updateXXXName));
+ else //test by
passing column name
+
rs.updateFloat(ColumnNames[sqlType-1], rs1.getFloat(updateXXXName));
+ } else if
(updateXXXName == 6){ //update column with updateDouble methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateDouble(sqlType, rs1.getDouble(updateXXXName));
+ else //test by
passing column name
+
rs.updateDouble(ColumnNames[sqlType-1], rs1.getDouble(updateXXXName));
+ } else if
(updateXXXName == 7){ //update column with updateString methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateString(sqlType, rs1.getString(updateXXXName));
+ else //test by
passing column name
+
rs.updateString(ColumnNames[sqlType-1], rs1.getString(updateXXXName));
+ } else if
(updateXXXName == 8){ //update column with updateAsciiStream methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateAsciiStream(sqlType,rs1.getAsciiStream(updateXXXName), 4);
+ else //test by
passing column name
+
rs.updateAsciiStream(ColumnNames[sqlType-1],rs1.getAsciiStream(updateXXXName),
4);
+ } else if
(updateXXXName == 9){ //update column with updateCharacterStream methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateCharacterStream(sqlType,rs1.getCharacterStream(updateXXXName), 4);
+ else //test by
passing column name
+
rs.updateCharacterStream(ColumnNames[sqlType-1],rs1.getCharacterStream(updateXXXName),
4);
+ } else if
(updateXXXName == 10){ //update column with updateByte methods
+
checkAgainstColumn = 1;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateByte(sqlType,rs1.getByte(checkAgainstColumn));
+ else //test by
passing column name
+
rs.updateByte(ColumnNames[sqlType-1],rs1.getByte(checkAgainstColumn));
+ } else if
(updateXXXName == 11){ //update column with updateBytes methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBytes(sqlType,rs1.getBytes(updateXXXName));
+ else //test by
passing column name
+
rs.updateBytes(ColumnNames[sqlType-1],rs1.getBytes(updateXXXName));
+ } else if
(updateXXXName == 12){ //update column with updateBinaryStream methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBinaryStream(sqlType,rs1.getBinaryStream(updateXXXName), 2);
+ else //test by
passing column name
+
rs.updateBinaryStream(ColumnNames[sqlType-1],rs1.getBinaryStream(updateXXXName),
2);
+ } else if
(updateXXXName == 13){ //update column with updateClob methods
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateClob(sqlType,rs1.getClob(updateXXXName));
+ else //test by
passing column name
+
rs.updateClob(ColumnNames[sqlType-1],rs1.getClob(updateXXXName));
+ } else if
(updateXXXName == 14){ //update column with updateDate methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateDate(sqlType,rs1.getDate(updateXXXName));
+ else //test by
passing column name
+
rs.updateDate(ColumnNames[sqlType-1],rs1.getDate(updateXXXName));
+ } else if
(updateXXXName == 15){ //update column with updateTime methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateTime(sqlType,rs1.getTime(updateXXXName));
+ else //test by
passing column name
+
rs.updateTime(ColumnNames[sqlType-1],rs1.getTime(updateXXXName));
+ } else if
(updateXXXName == 16){ //update column with updateTimestamp methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateTimestamp(sqlType,rs1.getTimestamp(updateXXXName));
+ else //test by
passing column name
+
rs.updateTimestamp(ColumnNames[sqlType-1],rs1.getTimestamp(updateXXXName));
+ } else if
(updateXXXName == 17){ //update column with updateBlob methods
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBlob(sqlType,rs1.getBlob(updateXXXName));
+ else //test by
passing column name
+
rs.updateBlob(ColumnNames[sqlType-1],rs1.getBlob(updateXXXName));
+ } else if
(updateXXXName == 18){ //update column with getBoolean methods
+ //use
SHORT sql type column's value for testing boolean since Derby don't support
boolean datatype
+ //Since
Derby does not support Boolean datatype, this method is going to fail with the
syntax error
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateBoolean(sqlType, rs1.getBoolean(1));
+ else //test by
passing column name
+
rs.updateBoolean(ColumnNames[sqlType-1], rs1.getBoolean(1));
+ } else if
(updateXXXName == 19){ //update column with updateNull methods
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateNull(sqlType);
+ else //test by
passing column name
+
rs.updateNull(ColumnNames[sqlType-1]);
+ } else if
(updateXXXName == 20){ //update column with updateArray methods - should get
not implemented exception
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateArray(sqlType, null);
+ else //test by
passing column name
+
rs.updateArray(ColumnNames[sqlType-1], null);
+ } else if (updateXXXName == 21){ //update column with updateRef
methods - should get not implemented exception
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateRef(sqlType, null);
+ else //test by
passing column name
+
rs.updateRef(ColumnNames[sqlType-1], null);
+ }
+ rs.updateRow();
+ if
(updateXXXRulesTable[sqlType-1][checkAgainstColumn-1].equals("ERROR")) {
+
System.out.println("FAILURE : We shouldn't reach here. The test should have
failed earlier on updateXXX or updateRow call");
+ return;
+ }
+ if
(verifyData(sqlType,checkAgainstColumn, "AllDataTypesNewValuesData") == false)
+ {
+
System.out.println("Test failed");
+ return;
+ }
+ } catch (Throwable e) {
+ if
(updateXXXRulesTable[sqlType-1][checkAgainstColumn-1].equals("ERROR"))
+
System.out.println(" Got expected exception : " + e.getMessage());
+ else {
+ if ((sqlType ==
14 || sqlType == 15 || sqlType == 16) && //we are dealing with
DATE/TIME/TIMESTAMP column types
+
checkAgainstColumn == 7) //we are dealing with updateString. The failure is
because string does not represent a valid datetime value
+
System.out.println(" Got expected exception : " + e.getMessage());
+ else {
+
System.out.println(" Got UNexpected exception : " + e.getMessage());
+ return;
+ }
+ }
+ }
+ }
+ rs.close();
+ rs1.close();
+ }
+ }
+ conn.setAutoCommit(true);
- // lifted from the autoGeneratedJdbc30 test
- public static void dumpRS(ResultSet s) throws SQLException
- {
- if (s == null)
- {
- System.out.println("<NULL>");
- return;
- }
+ System.out.println("---Positive Test22 - Test
updateObject method");
+ conn.setAutoCommit(false);
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt1 = conn.createStatement();
+ String displayString;
+ for (int sqlType = 1; sqlType <= allSQLTypes.length;
sqlType++ ) {
+ System.out.println("Next datatype to test is "
+ allSQLTypes[sqlType-1]);
+ for (int updateXXXName = 1; updateXXXName <=
allUpdateXXXNames.length; updateXXXName++) {
+ for (int indexOrName = 1; indexOrName
<= 2; indexOrName++) {
+ if (indexOrName == 1) //test by
passing column position
+ displayString = "
updateObject with column position &";
+ else
+ displayString = "
updateObject with column name &";
+ rs = stmt.executeQuery("SELECT
* FROM AllDataTypesForTestingTable FOR UPDATE");
+ rs.next();
+ rs1 =
stmt1.executeQuery("SELECT * FROM AllDataTypesNewValuesData");
+ rs1.next();
+ try {
+ if (updateXXXName ==
1){ //updateObject using Short object
+
System.out.println(displayString + " Short object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, new Short(rs1.getShort(updateXXXName)));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], new Short(rs1.getShort(updateXXXName)));
+ } else if
(updateXXXName == 2){ //updateObject using Integer object
+
System.out.println(displayString + " Integer object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, new Integer(rs1.getInt(updateXXXName)));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], new Integer(rs1.getInt(updateXXXName)));
+ } else if
(updateXXXName == 3){ //updateObject using Long object
+
System.out.println(displayString + " Long object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, new Long(rs1.getLong(updateXXXName)));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], new Long(rs1.getLong(updateXXXName)));
+ } else if
(updateXXXName == 4){ //updateObject using BigDecimal object
+
System.out.println(displayString + " BigDecimal object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, rs1.getBigDecimal(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], rs1.getBigDecimal(updateXXXName));
+ } else if
(updateXXXName == 5){ //updateObject using Float object
+
System.out.println(displayString + " Float object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, new Float(rs1.getFloat(updateXXXName)));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], new Float(rs1.getFloat(updateXXXName)));
+ } else if
(updateXXXName == 6){ //updateObject using Double object
+
System.out.println(displayString + " Double object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, new Double(rs1.getDouble(updateXXXName)));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], new
Double(rs1.getDouble(updateXXXName)));
+ } else if
(updateXXXName == 7){ //updateObject using String object
+
System.out.println(displayString + " String object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType,rs1.getString(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1],rs1.getString(updateXXXName));
+ } else if
(updateXXXName == 8 || updateXXXName == 12) //updateObject does not accept
InputStream and hence this is a no-op
+
continue;
+ else if (updateXXXName
== 9) //updateObject does not accept Reader and hence this is a no-op
+
continue;
+ else if (updateXXXName
== 10) //update column with updateByte methods
+
//non-Object parameter(which is byte in this cas) can't be passed to
updateObject mthod
+
continue;
+ else if (updateXXXName
== 11){ //update column with updateBytes methods
+
System.out.println(displayString + " bytes[] array as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType,rs1.getBytes(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], rs1.getBytes(updateXXXName));
+ } else if
(updateXXXName == 13){ //update column with updateClob methods
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+
System.out.println(displayString + " Clob object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, rs1.getClob(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], rs1.getClob(updateXXXName));
+ } else if
(updateXXXName == 14){ //update column with updateDate methods
+
System.out.println(displayString + " Date object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, rs1.getDate(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], rs1.getDate(updateXXXName));
+ } else if
(updateXXXName == 15){ //update column with updateTime methods
+
System.out.println(displayString + " Time object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, rs1.getTime(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], rs1.getTime(updateXXXName));
+ } else if
(updateXXXName == 16){ //update column with updateTimestamp methods
+
System.out.println(displayString + " TimeStamp object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, rs1.getTimestamp(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], rs1.getTimestamp(updateXXXName));
+ } else if
(updateXXXName == 17){ //update column with updateBlob methods
+ if
(JVMInfo.JDK_ID == 2) //Don't test this method because running JDK1.3 and this
jvm does not support the method
+
continue;
+
System.out.println(displayString + " Blob object as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, rs1.getBlob(updateXXXName));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], rs1.getBlob(updateXXXName));
+ } else if
(updateXXXName == 18) {//update column with getBoolean methods
+
System.out.println(displayString + " Boolean object as parameters");
+ //use
SHORT sql type column's value for testing boolean since Derby don't support
boolean datatype
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, new Boolean(rs1.getBoolean(1)));
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], new Boolean(rs1.getBoolean(1)));
+ } else if
(updateXXXName == 19){ //update column with updateNull methods
+
System.out.println(displayString + " null as parameters");
+ if (indexOrName
== 1) //test by passing column position
+
rs.updateObject(sqlType, null);
+ else //test by
passing column name
+
rs.updateObject(ColumnNames[sqlType-1], null);
+ } else if
(updateXXXName == 20 || updateXXXName == 21) //since Derby does not support
Array, Ref datatype, this is a no-op
+
continue;
+
+ rs.updateRow();
+ if
(updateXXXRulesTable[sqlType-1][updateXXXName-1].equals("ERROR")) {
+
System.out.println("FAILURE : We shouldn't reach here. The test should have
failed earlier on updateXXX or updateRow call");
+ return;
+ }
+ if
(verifyData(sqlType,updateXXXName, "AllDataTypesNewValuesData") == false)
+ {
+
System.out.println("Test failed");
+ return;
+ }
+ } catch (Throwable e) {
+ if
(updateXXXRulesTable[sqlType-1][updateXXXName-1].equals("ERROR"))
+
System.out.println(" Got expected exception : " + e.getMessage());
+ else {
+ if
((sqlType == 14 || sqlType == 15 || sqlType == 16) && //we are dealing with
DATE/TIME/TIMESTAMP column types
+
updateXXXName == 7) //we are dealing with updateString. The failure is because
string does not represent a valid datetime value
+
System.out.println(" Got expected exception : " + e.getMessage());
+ else {
+
System.out.println(" Got UNexpected exception : " + e.getMessage());
+ return;}
+ }
+ }
+ rs.close();
+ rs1.close();
+ }
+ }
+ }
+ conn.setAutoCommit(true);
- ResultSetMetaData rsmd = s.getMetaData();
+ System.out.println("---Positive Test23 - Test
cancelRowUpdates after updateXXX methods on all the supported sql datatypes");
+ conn.setAutoCommit(false);
+ reloadAllDataTypesForTestingTableData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt1 = conn.createStatement();
+ rs = stmt.executeQuery("SELECT * FROM
AllDataTypesForTestingTable FOR UPDATE");
+ rs.next();
+ rs1 = stmt1.executeQuery("SELECT * FROM
AllDataTypesNewValuesData");
+ rs1.next();
+
+ System.out.println(" updateShort and then
cancelRowUpdates");
+ short s = rs.getShort(1);
+ rs.updateShort(1, rs1.getShort(1));
+ if(rs.getShort(1) != rs1.getShort(1))
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getShort(1) != s)
+ return;
+
+ System.out.println(" updateInt and then
cancelRowUpdates");
+ int i = rs.getInt(2);
+ rs.updateInt(2, rs1.getInt(2));
+ if(rs.getInt(2) != rs1.getInt(2))
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getInt(2) != i)
+ return;
+
+ System.out.println(" updateLong and then
cancelRowUpdates");
+ long l = rs.getLong(3);
+ rs.updateLong(3, rs1.getLong(3));
+ if(rs.getLong(3) != rs1.getLong(3))
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getLong(3) != l)
+ return;
+
+ System.out.println(" updateBigDecimal and then
cancelRowUpdates");
+ BigDecimal bd = rs.getBigDecimal(4);
+ rs.updateBigDecimal(4, rs1.getBigDecimal(4));
+ if(rs.getBigDecimal(4).compareTo(rs1.getBigDecimal(4))
!= 0)
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getBigDecimal(4) != bd)
+ return;
+
+ System.out.println(" updateFloat and then
cancelRowUpdates");
+ float f = rs.getFloat(5);
+ rs.updateFloat(5, rs1.getFloat(5));
+ if(rs.getFloat(5) != rs1.getFloat(5))
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getFloat(5) != f)
+ return;
+
+ System.out.println(" updateDouble and then
cancelRowUpdates");
+ double db = rs.getDouble(6);
+ rs.updateDouble(6, rs1.getDouble(6));
+ if(rs.getDouble(6) != rs1.getDouble(6))
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getDouble(6) != db)
+ return;
+
+ System.out.println(" updateString and then
cancelRowUpdates");
+ String str = rs.getString(7);
+ rs.updateString(7, rs1.getString(7));
+ if(!rs.getString(7).equals(rs1.getString(7)))
+ return;
+ rs.cancelRowUpdates();
+ if(!rs.getString(7).equals(str))
+ return;
+
+ System.out.println(" updateAsciiStream and then
cancelRowUpdates");
+ str = rs.getString(8);
+ rs.updateAsciiStream(8,rs1.getAsciiStream(8), 4);
+ if(!rs.getString(8).equals(rs1.getString(8)))
+ return;
+ rs.cancelRowUpdates();
+ if(!rs.getString(8).equals(str))
+ return;
+
+ System.out.println(" updateCharacterStream and then
cancelRowUpdates");
+ str = rs.getString(9);
+ rs.updateCharacterStream(9,rs1.getCharacterStream(9),
4);
+ if(!rs.getString(9).equals(rs1.getString(9)))
+ return;
+ rs.cancelRowUpdates();
+ if(!rs.getString(9).equals(str))
+ return;
+
+ System.out.println(" updateByte and then
cancelRowUpdates");
+ s = rs.getShort(1);
+ rs.updateByte(1,rs1.getByte(1));
+ if(rs.getShort(1) != rs1.getShort(1))
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getShort(1) != s)
+ return;
+
+ System.out.println(" updateBytes and then
cancelRowUpdates");
+ byte[] bts = rs.getBytes(11);
+ rs.updateBytes(11,rs1.getBytes(11));
+ if
(!(java.util.Arrays.equals(rs.getBytes(11),rs1.getBytes(11))))
+ return;
+ rs.cancelRowUpdates();
+ if (!(java.util.Arrays.equals(rs.getBytes(11),bts)))
+ return;
+
+ System.out.println(" updateBinaryStream and then
cancelRowUpdates");
+ bts = rs.getBytes(12);
+ rs.updateBinaryStream(12,rs1.getBinaryStream(12), 2);
+ if
(!(java.util.Arrays.equals(rs.getBytes(12),rs1.getBytes(12))))
+ return;
+ rs.cancelRowUpdates();
+ if (!(java.util.Arrays.equals(rs.getBytes(12),bts)))
+ return;
+
+ System.out.println(" updateDate and then
cancelRowUpdates");
+ Date date = rs.getDate(14);
+ rs.updateDate(14,rs1.getDate(14));
+ if(rs.getDate(14).compareTo(rs1.getDate(14)) != 0)
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getDate(14).compareTo(date) != 0)
+ return;
+
+ System.out.println(" updateTime and then
cancelRowUpdates");
+ Time time = rs.getTime(15);
+ rs.updateTime(15,rs1.getTime(15));
+ if(rs.getTime(15).compareTo(rs1.getTime(15)) != 0)
+ return;
+ rs.cancelRowUpdates();
+ if(rs.getTime(15).compareTo(time) != 0)
+ return;
+
+ System.out.println(" updateTimestamp and then
cancelRowUpdates");
+ Timestamp timeStamp = rs.getTimestamp(16);
+ rs.updateTimestamp(16,rs1.getTimestamp(16));
+
if(!rs.getTimestamp(16).toString().equals(rs1.getTimestamp(16).toString()))
+ return;
+ rs.cancelRowUpdates();
+
if(!rs.getTimestamp(16).toString().equals(timeStamp.toString()))
+ return;
+
+ if (JVMInfo.JDK_ID != 2){ //Don't test this method when
running JDK1.3 because jdk1.3 does not support the method
+ System.out.println(" updateClob and then
cancelRowUpdates");
+ String clb1 = rs.getString(13);
+ rs.updateClob(13,rs1.getClob(13));
+ if(!rs.getString(13).equals(rs1.getString(13)))
+ return;
+ rs.cancelRowUpdates();
+ if(!rs.getString(13).equals(clb1))
+ return;
+ System.out.println(" updateBlob and then
cancelRowUpdates");
+ bts = rs.getBytes(17);
+ rs.updateBlob(17,rs1.getBlob(17));
+ if
(!(java.util.Arrays.equals(rs.getBytes(17),rs1.getBytes(17))))
+ return;
+ rs.cancelRowUpdates();
+ if
(!(java.util.Arrays.equals(rs.getBytes(17),bts)))
+ return;
+ }
+
+ rs.close();
+ rs1.close();
+ conn.setAutoCommit(true);
- // Get the number of columns in the result set
- int numCols = rsmd.getColumnCount();
+ System.out.println("---Positive Test24a - after
updateXXX, try cancelRowUpdates and then deleteRow");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row before updateInt is " +
rs.getInt(1));
+ rs.updateInt(1,234);
+ System.out.println("column 1 on this row after updateInt is " +
rs.getInt(1));
+ System.out.println("now cancelRowUpdates on the row");
+ rs.cancelRowUpdates();
+ System.out.println("Since after cancelRowUpdates(), ResultSet is
positioned on the same row, getXXX will pass");
+ System.out.println("column 1 on this row after cancelRowUpdates is " +
rs.getInt(1));
+ System.out.println("Since after cancelRowUpdates(), ResultSet is
positioned on the same row, a deleteRow at this point will pass");
+ try {
+ rs.deleteRow();
+ System.out.println("PASS : deleteRow passed as
expected");
+ }
+ catch (SQLException e) {
+ dumpSQLExceptions(e);
+ }
+ System.out.println("calling updateRow after deleteRow w/o first
positioning the ResultSet on the next row will fail");
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because ResultSet is not positioned on a row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("Position the ResultSet with next()");
+ rs.next();
+ System.out.println("Should be able to updateRow() on the current row
now");
+ rs.updateString(2,"234");
+ rs.updateRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
- if (numCols <= 0)
- {
- System.out.println("(no columns!)");
- return;
- }
+ System.out.println("---Positive Test25 - issue
cancelRowUpdates without any updateXXX");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ rs.cancelRowUpdates();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
- StringBuffer heading = new StringBuffer("\t ");
- StringBuffer underline = new StringBuffer("\t ");
+ System.out.println("---Positive Test26 - issue
updateRow without any updateXXX will not move the resultset position");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ rs.updateRow(); //this will not move the resultset to
right before the next row because there were no updateXXX issued before
updateRow
+ rs.updateRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
- int len;
- // Display column headings
- for (int i=1; i<=numCols; i++)
- {
- if (i > 1)
- {
- heading.append(",");
- underline.append(" ");
- }
- len = heading.length();
- heading.append(rsmd.getColumnLabel(i));
- len = heading.length() - len;
- for (int j = len; j > 0; j--)
- {
- underline.append("-");
- }
- }
- System.out.println(heading.toString());
- System.out.println(underline.toString());
+ System.out.println("---Positive Test27 - issue
updateXXX and then deleteRow");
+ reloadData();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ rs.updateInt(1,1234);
+ rs.updateString(2,"aaaaa");
+ rs.deleteRow();
+ try {
+ rs.updateRow();
+ System.out.println("FAIL!!! deleteRow should
have moved the ResultSet to right before the next row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ try {
+ rs.updateInt(1,2345);
+ System.out.println("FAIL!!! deleteRow should
have moved the ResultSet to right before the next row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ try {
+ rs.getInt(1);
+ System.out.println("FAIL!!! deleteRow should
have moved the ResultSet to right before the next row");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+ System.out.println("---Positive Test28 - issue
updateXXXs and then move off the row, the changes should be ignored");
+ reloadData();
+ dumpRS(stmt.executeQuery("select * from t1"));
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ System.out.println(" column 1 on this row before updateInt is " +
rs.getInt(1));
+ System.out.println(" Issue updateInt to change the
column's value to 2345");
+ rs.updateInt(1,2345);
+ System.out.println(" Move to next row w/o issuing
updateRow");
+ rs.next(); //the changes made on the earlier row should
have be ignored because we moved off that row without issuing updateRow
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+ System.out.println(" Make sure that changes didn't
make it to the database");
+ dumpRS(stmt.executeQuery("select * from t1"));
- StringBuffer row = new StringBuffer();
- // Display data, fetching until end of the result set
- while (s.next())
- {
- row.append("\t{");
- // Loop through each column, getting the
- // column data and displaying
- for (int i=1; i<=numCols; i++)
- {
- if (i > 1) row.append(",");
- row.append(s.getString(i));
- }
- row.append("}\n");
- }
- System.out.println(row.toString());
- s.close();
- }
+ System.out.println("---Positive Test29 - issue multiple
updateXXXs and then a updateRow");
+ reloadData();
+ dumpRS(stmt.executeQuery("select * from t1"));
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ System.out.println(" column 1 on this row before updateInt is " +
rs.getInt(1));
+ System.out.println(" Issue updateInt to change the
column's value to 2345");
+ rs.updateInt(1,2345);
+ System.out.println(" Issue another updateInt on the
same row and column to change the column's value to 9999");
+ rs.updateInt(1,9999);
+ System.out.println(" Issue updateString to change the
column's value to 'xxxxxxx'");
+ rs.updateString(2,"xxxxxxx");
+ System.out.println(" Now issue updateRow");
+ rs.updateRow();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+ System.out.println(" Make sure that changes made it to
the database correctly");
+ dumpRS(stmt.executeQuery("select * from t1"));
- static void reloadData() throws SQLException {
- Statement stmt = conn.createStatement();
- stmt.executeUpdate("delete from t1");
- stmt.executeUpdate("insert into t1 values (1,'aa'), (2,'bb'),
(3,'cc')");
- stmt.executeUpdate("delete from t3");
- stmt.executeUpdate("insert into t3 values (1,1), (2,2)");
- stmt.executeUpdate("delete from tableWithDeleteTriggers");
- stmt.executeUpdate("insert into tableWithDeleteTriggers values
(1, 1), (2, 2), (3, 3), (4, 4)");
+ System.out.println("---Positive Test30 - call updateXXX
methods on only columns that correspond to a column in the table");
+ dumpRS(stmt.executeQuery("select * from t1"));
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2, c1, c2 FROM t1 FOR UPDATE");
+ rs.next();
+ rs.updateInt(3,22);
+ rs.updateRow();
+ rs.close();
+ System.out.println(" Make sure that changes made it to
the database correctly");
+ dumpRS(stmt.executeQuery("select * from t1"));
+
+ teardown();
+
+ conn.close();
+
+ } catch (Throwable e) {
+ System.out.println("FAIL: exception thrown:");
+ JDBCDisplayUtil.ShowException(System.out,e);
+ e.printStackTrace();
+ }
+
+ System.out.println("Finished testing updateable resultsets");
+ }
+
+ static boolean verifyData(int sqlType, int updateXXXName, String
checkAgainstTheTable) throws SQLException {
+ Statement stmt1 = conn.createStatement();
+ ResultSet rs1 = stmt1.executeQuery("select * from " +
checkAgainstTheTable);
+ rs1.next();
+ Statement stmt = conn.createStatement();
+ ResultSet rs = stmt.executeQuery("select * from
AllDataTypesForTestingTable");
+ rs.next();
+
+ if (updateXXXName == 19){ //verifying updateNull
+ if(rs.getObject(sqlType) == null && rs.wasNull())
+ return(true);
+ else
+ return(false);
+ }
+
+ if (sqlType == 1) //verify update made to SMALLINT column with
updateXXX methods
+ if(rs.getShort(sqlType) != rs1.getShort(updateXXXName))
{
+ return(false); }
+ else if (sqlType == 2) //verify update made to INTEGER column
with updateXXX methods
+ if(rs.getInt(sqlType) != rs1.getInt(updateXXXName)) {
+ return(false); }
+ else if (sqlType == 3) //verify update made to BIGINT column
with updateXXX methods
+ if(rs.getLong(sqlType) != rs1.getLong(updateXXXName)) {
+ return(false); }
+ else if (sqlType == 4) //verify update made to DECIMAL column
with updateXXX methods
+ if(rs.getBigDecimal(sqlType) !=
rs1.getBigDecimal(updateXXXName)) {
+ return(false); }
+ else if (sqlType == 5) //verify update made to REAL column
with updateXXX methods
+ if(rs.getFloat(sqlType) != rs1.getFloat(updateXXXName))
{
+ return(false); }
+ else if (sqlType == 6) //verify update made to DOUBLE column
with updateXXX methods
+ if(rs.getDouble(sqlType) !=
rs1.getDouble(updateXXXName)) {
+ return(false); }
+ else if (sqlType == 7 || sqlType == 8 || sqlType == 9)
//verify update made to CHAR/VARCHAR/LONG VARCHAR column with updateXXX methods
+
if(!rs.getString(sqlType).equals(rs1.getString(updateXXXName))) {
+ return(false); }
+ else if (sqlType == 10 || sqlType == 11 || sqlType == 12)
//verify update made to CHAR/VARCHAR/LONG VARCHAR FOR BIT DATA column with
updateXXX methods
+ if(rs.getBytes(sqlType) != rs1.getBytes(updateXXXName))
{
+ return(false); }
+ else if (sqlType == 13 && JVMInfo.JDK_ID != 2) //verify update
made to CLOB column with updateXXX methods
+
if(!rs.getClob(sqlType).getSubString(1,4).equals(rs1.getClob(updateXXXName).getSubString(1,4)))
{
+ return(false); }
+ else if (sqlType == 14) //verify update made to DATE column
with updateXXX methods
+ if(rs.getDate(sqlType) != rs1.getDate(updateXXXName)) {
+ return(false); }
+ else if (sqlType == 15) //verify update made to TIME column
with updateXXX methods
+ if(rs.getTime(sqlType) != rs1.getTime(updateXXXName)) {
+ return(false); }
+ else if (sqlType == 16) //verify update made to TIMESTAMP
column with updateXXX methods
+ if(rs.getTimestamp(sqlType) !=
rs1.getTimestamp(updateXXXName)) {
+ return(false); }
+ else if (sqlType == 17 && JVMInfo.JDK_ID != 2) //verify update
made to BLOB column with updateXXX methods
+ if(rs.getBlob(sqlType).getBytes(1,4) !=
rs1.getBlob(updateXXXName).getBytes(1,4)) {
+ return(false); }
+
+ stmt.executeUpdate("delete from AllDataTypesForTestingTable");
+ StringBuffer insertSQL = new StringBuffer("insert into
AllDataTypesForTestingTable values(");
+ for (int type = 0; type < allSQLTypes.length - 1; type++)
+ {
+ insertSQL.append(SQLData[type][0] + ",");
+ }
+ insertSQL.append("cast("+SQLData[allSQLTypes.length - 1][0]+"
as BLOB(1K)))");
+ stmt.executeUpdate(insertSQL.toString());
+ return(true);
+ }
+
+ // lifted from the autoGeneratedJdbc30 test
+ public static void dumpRS(ResultSet s) throws SQLException
+ {
+ if (s == null)
+ {
+ System.out.println("<NULL>");
+ return;
+ }
+
+ ResultSetMetaData rsmd = s.getMetaData();
+
+ // Get the number of columns in the result set
+ int numCols = rsmd.getColumnCount();
+
+ if (numCols <= 0)
+ {
+ System.out.println("(no columns!)");
+ return;
+ }
+
+ StringBuffer heading = new StringBuffer("\t ");
+ StringBuffer underline = new StringBuffer("\t ");
+
+ int len;
+ // Display column headings
+ for (int i=1; i<=numCols; i++)
+ {
+ if (i > 1)
+ {
+ heading.append(",");
+ underline.append(" ");
+ }
+ len = heading.length();
+ heading.append(rsmd.getColumnLabel(i));
+ len = heading.length() - len;
+ for (int j = len; j > 0; j--)
+ {
+ underline.append("-");
+ }
+ }
+ System.out.println(heading.toString());
+ System.out.println(underline.toString());
+
+
+ StringBuffer row = new StringBuffer();
+ // Display data, fetching until end of the result set
+ while (s.next())
+ {
+ row.append("\t{");
+ // Loop through each column, getting the
+ // column data and displaying
+ for (int i=1; i<=numCols; i++)
+ {
+ if (i > 1) row.append(",");
+ row.append(s.getString(i));
+ }
+ row.append("}\n");
+ }
+ System.out.println(row.toString());
+ s.close();
+ }
+
+ static void reloadAllDataTypesForTestingTableData() throws SQLException
{
+ Statement stmt = conn.createStatement();
+ stmt.executeUpdate("delete from t1");
+ stmt.executeUpdate("delete from AllDataTypesForTestingTable");
+ StringBuffer insertSQL = new StringBuffer("insert into
AllDataTypesForTestingTable values(");
+ for (int type = 0; type < allSQLTypes.length - 1; type++)
+ insertSQL.append(SQLData[type][0] + ",");
+ insertSQL.append("cast("+SQLData[allSQLTypes.length - 1][0]+"
as BLOB(1K)))");
+ stmt.executeUpdate(insertSQL.toString());
+ }
+
+ static void reloadData() throws SQLException {
+ Statement stmt = conn.createStatement();
+ stmt.executeUpdate("delete from t1");
+ stmt.executeUpdate("insert into t1 values (1,'aa'), (2,'bb'),
(3,'cc')");
+ stmt.executeUpdate("delete from t3");
+ stmt.executeUpdate("insert into t3 values (1,1), (2,2)");
+ stmt.executeUpdate("delete from table0WithTriggers");
+ stmt.executeUpdate("insert into table0WithTriggers values (1,
1), (2, 2), (3, 3), (4, 4)");
+ stmt.executeUpdate("delete from table1WithTriggers");
+ stmt.executeUpdate("insert into table1WithTriggers values (1,
1), (2, 2), (3, 3), (4, 4)");
+ stmt.executeUpdate("delete from table2WithTriggers");
+ stmt.executeUpdate("insert into table2WithTriggers values (1,
1), (2, 2), (3, 3), (4, 4)");
stmt.executeUpdate("delete from
deleteTriggerInsertIntoThisTable");
+ stmt.executeUpdate("delete from
updateTriggerInsertIntoThisTable");
}
+
+ static void setup(boolean first) throws SQLException {
+ Statement stmt = conn.createStatement();
+ stmt.executeUpdate("create table t1 (c1 int, c2 char(20))");
+ stmt.executeUpdate("create view v1 as select * from t1");
+ stmt.executeUpdate("create table t2 (c21 int, c22 int)");
+ stmt.executeUpdate("create table t3 (c31 int not null primary
key, c32 smallint)");
+ stmt.executeUpdate("create table tableWithPrimaryKey (c1 int
not null, c2 int not null, constraint pk primary key(c1,c2))");
+ stmt.executeUpdate("create table tableWithConstraint (c1 int,
c2 int, constraint fk foreign key(c1,c2) references tableWithPrimaryKey)");
+ stmt.executeUpdate("create table table0WithTriggers (c1 int, c2
bigint)");
+ stmt.executeUpdate("create table
deleteTriggerInsertIntoThisTable (c1 int)");
+ stmt.executeUpdate("create table
updateTriggerInsertIntoThisTable (c1 int)");
+ stmt.executeUpdate("create trigger tr1 after delete on
table0WithTriggers for each statement mode db2sql insert into
deleteTriggerInsertIntoThisTable values (1)");
+ stmt.executeUpdate("create trigger tr2 after update on
table0WithTriggers for each statement mode db2sql insert into
updateTriggerInsertIntoThisTable values (1)");
+ stmt.executeUpdate("create table table1WithTriggers (c1 int, c2
bigint)");
+ stmt.executeUpdate("create trigger tr3 after delete on
table1WithTriggers for each statement mode db2sql delete from
table1WithTriggers");
+ stmt.executeUpdate("create table table2WithTriggers (c1 int, c2
bigint)");
+ stmt.executeUpdate("create trigger tr4 after update on
table2WithTriggers for each statement mode db2sql update table2WithTriggers set
c1=1");
+ stmt.executeUpdate("create table selfReferencingT1 (c1 char(2)
not null, c2 char(2), constraint selfReferencingT1 primary key(c1), constraint
manages1 foreign key(c2) references selfReferencingT1(c1) on delete cascade)");
+ stmt.executeUpdate("create table selfReferencingT2 (c1 char(2)
not null, c2 char(2), constraint selfReferencingT2 primary key(c1), constraint
manages2 foreign key(c2) references selfReferencingT2(c1) on update restrict)");
- static void setup(boolean first) throws SQLException {
- Statement stmt = conn.createStatement();
- stmt.executeUpdate("create table t1 (c1 int, c2 char(20))");
- stmt.executeUpdate("create view v1 as select * from t1");
- stmt.executeUpdate("create table t2 (c21 int, c22 int)");
- stmt.executeUpdate("create table t3 (c31 int not null primary
key, c32 smallint)");
- stmt.executeUpdate("create table tableWithPrimaryKey (c1 int
not null, c2 int not null, constraint pk primary key(c1,c2))");
- stmt.executeUpdate("create table tableWithConstraint (c1 int,
c2 int, constraint fk foreign key(c1,c2) references tableWithPrimaryKey)");
- stmt.executeUpdate("create table tableWithDeleteTriggers (c1
int, c2 bigint)");
- stmt.executeUpdate("create table
deleteTriggerInsertIntoThisTable (c1 int)");
- stmt.executeUpdate("create trigger tr1 after delete on
tableWithDeleteTriggers for each statement mode db2sql insert into
deleteTriggerInsertIntoThisTable values (1)");
- stmt.executeUpdate("create table anotherTableWithDeleteTriggers
(c1 int, c2 bigint)");
- stmt.executeUpdate("create trigger tr2 after delete on
anotherTableWithDeleteTriggers for each statement mode db2sql delete from
anotherTableWithDeleteTriggers");
- stmt.executeUpdate("create table selfReferencingT1 (c1 char(2)
not null, c2 char(2), constraint selfReferencingT1 primary key(c1), constraint
manages foreign key(c2) references selfReferencingT1(c1) on delete cascade)");
-
- stmt.executeUpdate("insert into t1 values (1,'aa')");
- stmt.executeUpdate("insert into t1 values (2,'bb')");
- stmt.executeUpdate("insert into t1 values (3,'cc')");
- stmt.executeUpdate("insert into t2 values (1,1)");
- stmt.executeUpdate("insert into t3 values (1,1)");
- stmt.executeUpdate("insert into t3 values (2,2)");
- stmt.executeUpdate("insert into tableWithPrimaryKey values (1,
1), (2, 2), (3, 3), (4, 4)");
- stmt.executeUpdate("insert into tableWithConstraint values (1,
1), (2, 2), (3, 3), (4, 4)");
- stmt.executeUpdate("insert into tableWithDeleteTriggers values
(1, 1), (2, 2), (3, 3), (4, 4)");
- stmt.executeUpdate("insert into anotherTableWithDeleteTriggers
values (1, 1), (2, 2), (3, 3), (4, 4)");
- stmt.executeUpdate("insert into selfReferencingT1 values ('e1',
null), ('e2', 'e1'), ('e3', 'e2'), ('e4', 'e3')");
- stmt.close();
- }
-
-
- static void teardown() throws SQLException {
- Statement stmt = conn.createStatement();
- stmt.executeUpdate("drop table t1");
- stmt.executeUpdate("drop table t2");
- stmt.executeUpdate("drop table t3");
- stmt.executeUpdate("drop table tableWithConstraint");
- stmt.executeUpdate("drop table tableWithPrimaryKey");
- stmt.executeUpdate("drop table
deleteTriggerInsertIntoThisTable");
- stmt.executeUpdate("drop table tableWithDeleteTriggers");
- stmt.executeUpdate("drop table anotherTableWithDeleteTriggers");
+ stmt.executeUpdate("insert into t1 values (1,'aa')");
+ stmt.executeUpdate("insert into t1 values (2,'bb')");
+ stmt.executeUpdate("insert into t1 values (3,'cc')");
+ stmt.executeUpdate("insert into t2 values (1,1)");
+ stmt.executeUpdate("insert into t3 values (1,1)");
+ stmt.executeUpdate("insert into t3 values (2,2)");
+ stmt.executeUpdate("insert into tableWithPrimaryKey values (1,
1), (2, 2), (3, 3), (4, 4)");
+ stmt.executeUpdate("insert into tableWithConstraint values (1,
1), (2, 2), (3, 3), (4, 4)");
+ stmt.executeUpdate("insert into table0WithTriggers values (1,
1), (2, 2), (3, 3), (4, 4)");
+ stmt.executeUpdate("insert into table1WithTriggers values (1,
1), (2, 2), (3, 3), (4, 4)");
+ stmt.executeUpdate("insert into table2WithTriggers values (1,
1), (2, 2), (3, 3), (4, 4)");
+ stmt.executeUpdate("insert into selfReferencingT1 values ('e1',
null), ('e2', 'e1'), ('e3', 'e2'), ('e4', 'e3')");
+ stmt.executeUpdate("insert into selfReferencingT2 values ('e1',
null), ('e2', 'e1'), ('e3', 'e2'), ('e4', 'e3')");
+
+ StringBuffer createSQL = new StringBuffer("create table
AllDataTypesForTestingTable (");
+ StringBuffer createTestDataSQL = new StringBuffer("create table
AllDataTypesNewValuesData (");
+ for (int type = 0; type < allSQLTypes.length - 1; type++)
+ {
+ createSQL.append(ColumnNames[type] + " " +
allSQLTypes[type] + ",");
+ createTestDataSQL.append(ColumnNames[type] + " " +
allSQLTypes[type] + ",");
+ }
+ createSQL.append(ColumnNames[allSQLTypes.length - 1] + " " +
allSQLTypes[allSQLTypes.length - 1] + ")");
+ createTestDataSQL.append(ColumnNames[allSQLTypes.length - 1] +
" " + allSQLTypes[allSQLTypes.length - 1] + ")");
+ stmt.executeUpdate(createSQL.toString());
+ stmt.executeUpdate(createTestDataSQL.toString());
+
+ createSQL = new StringBuffer("insert into
AllDataTypesForTestingTable values(");
+ createTestDataSQL = new StringBuffer("insert into
AllDataTypesNewValuesData values(");
+ for (int type = 0; type < allSQLTypes.length - 1; type++)
+ {
+ createSQL.append(SQLData[type][0] + ",");
+ createTestDataSQL.append(SQLData[type][1] + ",");
+ }
+ createSQL.append("cast("+SQLData[allSQLTypes.length - 1][0]+"
as BLOB(1K)))");
+ createTestDataSQL.append("cast("+SQLData[allSQLTypes.length -
1][1]+" as BLOB(1K)))");
+ stmt.executeUpdate(createSQL.toString());
+ stmt.executeUpdate(createTestDataSQL.toString());
+
+ stmt.close();
+ }
+
+
+ static void teardown() throws SQLException {
+ Statement stmt = conn.createStatement();
+ stmt.executeUpdate("drop table t1");
+ stmt.executeUpdate("drop table t2");
+ stmt.executeUpdate("drop table t3");
+ stmt.executeUpdate("drop table tableWithConstraint");
+ stmt.executeUpdate("drop table tableWithPrimaryKey");
+ stmt.executeUpdate("drop table
deleteTriggerInsertIntoThisTable");
+ stmt.executeUpdate("drop table
updateTriggerInsertIntoThisTable");
+ stmt.executeUpdate("drop table table0WithTriggers");
+ stmt.executeUpdate("drop table table1WithTriggers");
+ stmt.executeUpdate("drop table table2WithTriggers");
stmt.executeUpdate("drop table selfReferencingT1");
+ stmt.executeUpdate("drop table selfReferencingT2");
conn.commit();
- stmt.close();
- }
-
- public static void showScanStatistics(ResultSet rs, Connection conn)
- {
- Statement s = null;
- ResultSet infors = null;
-
-
- try {
- rs.close(); // need to close to get statistics
- s =conn.createStatement();
- infors = s.executeQuery("values
SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()");
- JDBCDisplayUtil.setMaxDisplayWidth(2000);
- JDBCDisplayUtil.DisplayResults(System.out,infors,conn);
- infors.close();
- }
- catch (SQLException se)
- {
- System.out.print("FAIL:");
- JDBCDisplayUtil.ShowSQLException(System.out,se);
- }
- }
-
- static private void dumpSQLExceptions (SQLException se) {
- System.out.println("FAIL -- unexpected exception: " +
se.toString());
- while (se != null) {
- System.out.print("SQLSTATE("+se.getSQLState()+"):");
- se = se.getNextException();
- }
- }
-
-}
+ stmt.close();
+ }
+
+ public static void showScanStatistics(ResultSet rs, Connection conn)
+ {
+ Statement s = null;
+ ResultSet infors = null;
+
+
+ try {
+ rs.close(); // need to close to get statistics
+ s =conn.createStatement();
+ infors = s.executeQuery("values
SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()");
+ JDBCDisplayUtil.setMaxDisplayWidth(2000);
+ JDBCDisplayUtil.DisplayResults(System.out,infors,conn);
+ infors.close();
+ }
+ catch (SQLException se)
+ {
+ System.out.print("FAIL:");
+ JDBCDisplayUtil.ShowSQLException(System.out,se);
+ }
+ }
+
+ static private void dumpSQLExceptions (SQLException se) {
+ System.out.println("FAIL -- unexpected exception: " +
se.toString());
+ while (se != null) {
+ System.out.print("SQLSTATE("+se.getSQLState()+"):");
+ se = se.getNextException();
+ }
+ }
+
+}
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
(revision 151757)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
(working copy)
@@ -103,7 +103,7 @@
System.out.println();
System.out.println("trying rs.updateBlob(int, Blob)
:");
rs.updateBlob(8,null);
- System.out.println("Shouldn't reach here. Method not
implemented yet.");
+ System.out.println("Shouldn't reach here because
method is being invoked on a read only resultset");
} catch (SQLException ex) {
System.out.println("Expected : " + ex.getMessage());
}
@@ -112,7 +112,7 @@
System.out.println();
System.out.println("trying rs.updateBlob(String,
Blob) :");
rs.updateBlob("c",null);
- System.out.println("Shouldn't reach here. Method not
implemented yet.");
+ System.out.println("Shouldn't reach here because
method is being invoked on a read only resultset");
} catch (SQLException ex) {
System.out.println("Expected : " + ex.getMessage());
}
@@ -121,7 +121,7 @@
System.out.println();
System.out.println("trying rs.updateClob(int, Clob)
:");
rs.updateClob(8,null);
- System.out.println("Shouldn't reach here. Method not
implemented yet.");
+ System.out.println("Shouldn't reach here because
method is being invoked on a read only resultset");
} catch (SQLException ex) {
System.out.println("Expected : " + ex.getMessage());
}
@@ -130,7 +130,7 @@
System.out.println();
System.out.println("trying rs.updateClob(String,
Clob) :");
rs.updateClob("c",null);
- System.out.println("Shouldn't reach here. Method not
implemented yet.");
+ System.out.println("Shouldn't reach here because
method is being invoked on a read only resultset");
} catch (SQLException ex) {
System.out.println("Expected : " + ex.getMessage());
}
Index:
java/testing/org/apache/derbyTesting/functionTests/master/resultsetJdbc30.out
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/master/resultsetJdbc30.out
(revision 151757)
+++
java/testing/org/apache/derbyTesting/functionTests/master/resultsetJdbc30.out
(working copy)
@@ -8,13 +8,13 @@
trying rs.updateRef(String, Ref) :
Expected : Feature not implemented: no details.
trying rs.updateBlob(int, Blob) :
-Expected : Feature not implemented: no details.
+Expected : 'updateBlob' not allowed because the ResultSet is not an updatable
ResultSet.
trying rs.updateBlob(String, Blob) :
-Expected : Feature not implemented: no details.
+Expected : 'updateBlob' not allowed because the ResultSet is not an updatable
ResultSet.
trying rs.updateClob(int, Clob) :
-Expected : Feature not implemented: no details.
+Expected : 'updateClob' not allowed because the ResultSet is not an updatable
ResultSet.
trying rs.updateClob(String, Clob) :
-Expected : Feature not implemented: no details.
+Expected : 'updateClob' not allowed because the ResultSet is not an updatable
ResultSet.
trying rs.updateArray(int, Array) :
Expected : Feature not implemented: no details.
trying rs.updateClob(String, Array) :
Index:
java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
(revision 151757)
+++
java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
(working copy)
@@ -1,265 +1,2871 @@
-Start testing delete using JDBC2.0 updateable resultset apis
----Negative Testl - request for scroll insensitive updatable resultset will
give a read only scroll insensitive resultset
-warnings on connection = SQL Warning: Scroll sensitive and scroll insensitive
updatable ResultSets are not currently implemented.
-requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
-Make sure that we got TYPE_SCROLL_INSENSITIVE? true
-Make sure that we got CONCUR_READ_ONLY? true
-ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-JDBC 2.0 updatable resultset api will fail on this resultset because this is
not an updatable resultset
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
----Negative Test2 - request for scroll sensitive updatable resultset will give
a read only scroll insensitive resultset
-requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
-Make sure that we got TYPE_SCROLL_INSENSITIVE? true
-Make sure that we got CONCUR_READ_ONLY? true
-JDBC 2.0 updatable resultset api will fail on this resultset because this is
not an updatable resultset
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
----Negative Test3 - request a read only resultset and attempt deleteRow on it
-Make sure that we got CONCUR_READ_ONLY? true
-Now attempting to send a deleteRow on a read only resultset.
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
----Negative Test4 - request a read only resultset and send a sql with FOR
UPDATE clause and attempt deleteRow on it
-Make sure that we got CONCUR_READ_ONLY? true
-Now attempting to send a deleteRow on a read only resultset with FOR UPDATE
clause in the SELECT sql.
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
----Negative Test5 - request updatable resultset for sql with no FOR UPDATE
clause
-Make sure that we got CONCUR_READ_ONLY? true
-Expected warnings on resultset = java.sql.SQLWarning: ResultSet not updatable.
Query does not qualify to generate an updatable ResultSet.
-Now attempting to send a delete on a sql with no FOR UPDATE clause.
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
----Negative Test6 - request updatable resultset for sql with FOR READ ONLY
clause
-Make sure that we got CONCUR_READ_ONLY? true
-Expected warnings on resultset = java.sql.SQLWarning: ResultSet not updatable.
Query does not qualify to generate an updatable ResultSet.
-Now attempting to send a delete on a sql with FOR READ ONLY clause.
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
----Negative Test7 - attempt to deleteRow on updatable resultset when the
resultset is not positioned on a row
-Make sure that we got CONCUR_UPDATABLE? true
-Now attempt a deleteRow without first doing next on the resultset.
-Got expected exception Invalid cursor state - no current row.
-ResultSet is positioned after the last row. attempt to deleteRow at this point
should fail!
-Got expected exception Invalid cursor state - no current row.
----Negative Test8 - attempt deleteRow on updatable resultset after closing the
resultset
-Make sure that we got CONCUR_UPDATABLE? true
-Got expected exception ResultSet not open, operation 'deleteRow' not
permitted. Verify that autocommit is OFF.
----Negative Test9 - try updatable resultset on system table
-expected exception FOR UPDATE is not permitted on this type of statement.
----Negative Test10 - try updatable resultset on a view
-expected exception FOR UPDATE is not permitted on this type of statement.
----Negative Test11 - attempt to open updatable resultset when there is join in
the select query should fail
-expected exception FOR UPDATE is not permitted on this type of statement.
----Negative Test12 - With autocommit on, attempt to drop a table when there is
an open updatable resultset on it
-Opened an updatable resultset. Now trying to drop that table through another
Statement
-expected exception Operation 'DROP TABLE' cannot be performed on object 'T1'
because there is an open ResultSet dependent on that object.
-Since autocommit is on, the drop table exception resulted in a runtime
rollback causing updatable resultset object to close
-expected exception ResultSet not open, operation 'deleteRow' not permitted.
Verify that autocommit is OFF.
----Negative Test13 - foreign key constraint failure will cause deleteRow to
fail
-expected exception DELETE on table 'TABLEWITHPRIMARYKEY' caused a violation of
foreign key constraint 'FK' for key (1,1). The statement has been rolled back.
-Since autocommit is on, the constraint exception resulted in a runtime
rollback causing updatable resultset object to close
-expected exception ResultSet not open, operation 'next' not permitted. Verify
that autocommit is OFF.
----Positive Test1 - request updatable resultset for forward only type resultset
-requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
-got TYPE_FORWARD_ONLY? true
-got CONCUR_UPDATABLE? true
-JDBC 2.0 updatable resultset apis on this ResultSet object will pass because
this is an updatable resultset
-column 1 on this row before deleteRow is 1
-column 2 on this row before deleteRow is aa
-Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
-Got expected exception Invalid cursor state - no current row.
-calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
-Got expected exception Invalid cursor state - no current row.
-Position the ResultSet with next()
-Should be able to deletRow() on the current row now
----Positive Test2 - even if no columns from table specified in the column
list, we should be able to get updatable resultset
-total number of rows in T1
- 1
- -
- {3}
-column 1 on this row is 1
-total number of rows in T1 after one deleteRow is
- 1
- -
- {2}
----Positive Test3 - use prepared statement with concur updatable status
-requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
-got TYPE_FORWARD_ONLY? true
-got CONCUR_UPDATABLE? true
-column 1 on this row is 1
-Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
-Got expected exception Invalid cursor state - no current row.
-calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
-Got expected exception Invalid cursor state - no current row.
-Position the ResultSet with next()
-Should be able to deletRow() on the current row now
----Positive Test4 - use callable statement with concur updatable status
-requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
-got TYPE_FORWARD_ONLY? true
-got CONCUR_UPDATABLE? true
-row not deleted yet. Confirm with rs.rowDeleted()? false
-column 1 on this row is 1
-Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
-Got expected exception Invalid cursor state - no current row.
-calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
-Got expected exception Invalid cursor state - no current row.
-Position the ResultSet with next()
-Should be able to deletRow() on the current row now
----Positive Test5 - donot have to select primary key to get an updatable
resultset
-column 1 on this row is 1
-now try to delete row when primary key is not selected for that row
----Positive Test6 - For Forward Only resultsets, DatabaseMetaData will return
false for ownDeletesAreVisible and deletesAreDetected
----This is because, after deleteRow, we position the ResultSet before the next
row. We don't make a hole for the deleted row and then stay on that deleted hole
-ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
-othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true
-deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
-The JDBC program should look at rowDeleted only if deletesAreDetected returns
true
-Since Derby returns false for detlesAreDetected for FORWARD_ONLY updatable
resultset,the program should not rely on rs.rowDeleted() for FORWARD_ONLY
updatable resultsets
-Have this call to rs.rowDeleted() just to make sure the method does always
return false? false
-Have this call to rs.rowDeleted() just to make sure the method does always
return false? false
----Positive Test7 - delete using updatable resultset api from a temporary table
-following rows in temp table before deleteRow
- C21,C22
- --- ---
- {21,1}
- {22,1}
-As expected, no rows in temp table after deleteRow
- C21,C22
- --- ---
----Positive Test8 - change the name of the resultset and see if deleteRow
still works
-change the cursor name(case sensitive name) with setCursorName and then try to
deleteRow
-change the cursor name one more time with setCursorName and then try to
deleteRow
----Positive Test9 - using correlation name for the table in the select sql is
not a problem
-column 1 on this row is 1
-now try to deleteRow
----Positive Test10 - 2 updatable resultsets going against the same table, will
they conflict?
-delete using first resultset
-attempt to send deleteRow on the same row through a different resultset should
throw an exception
-Got expected exception Cursor 'SQLCUR10' is not on a row.
-Move to next row in the 2nd resultset and then delete using the second
resultset
----Positive Test11 - setting the fetch size to > 1 will be ignored by
updatable resultset. Same as updatable cursors
-Notice the Fetch Size in run time statistics output.
-1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-Statement Name:
- null
-Statement Text:
- SELECT 1, 2 FROM t1 FOR UPDATE of c1
-Parse Time: 0
-Bind Time: 0
-Optimize Time: 0
-Generate Time: 0
-Compile Time: 0
-Execute Time: 0
-Begin Compilation Timestamp : null
-End Compilation Timestamp : null
-Begin Execution Timestamp : null
-End Execution Timestamp : null
-Statement Execution Plan Text:
-Project-Restrict ResultSet (3):
-Number of opens = 1
-Rows seen = 0
-Rows filtered = 0
-restriction = false
-projection = true
- constructor time (milliseconds) = 0
- open time (milliseconds) = 0
- next time (milliseconds) = 0
- close time (milliseconds) = 0
- restriction time (milliseconds) = 0
- projection time (milliseconds) = 0
-Source result set:
- Project-Restrict ResultSet (2):
- Number of opens = 1
- Rows seen = 0
- Rows filtered = 0
- restriction = false
- projection = true
- constructor time (milliseconds) = 0
- open time (milliseconds) = 0
- next time (milliseconds) = 0
- close time (milliseconds) = 0
- restriction time (milliseconds) = 0
- projection time (milliseconds) = 0
- Source result set:
- Table Scan ResultSet for T1 at read committed isolation level
using exclusive row locking chosen by the optimizer
- Number of opens = 1
- Rows seen = 0
- Rows filtered = 0
- Fetch Size = 1
- constructor time (milliseconds) = 0
- open time (milliseconds) = 0
- next time (milliseconds) = 0
- close time (milliseconds) = 0
- scan information:
- Bit set of columns fetched=All
- Number of columns fetched=2
- Number of pages visited=0
- Number of rows qualified=0
- Number of rows visited=0
- Scan type=heap
- start position:
-null stop position:
-null qualifiers:
-None
-statement's fetch size is 200
----Positive Test12 - make sure delete trigger gets fired when deleteRow is
issued
-Verify that before delete trigger got fired, row count is 0 in
deleteTriggerInsertIntoThisTable
- 1
- -
- {0}
-column 1 on this row is 1
-now try to delete row and make sure that trigger got fired
-Verify that delete trigger got fired by verifying the row count to be 1 in
deleteTriggerInsertIntoThisTable
- 1
- -
- {1}
----Positive Test13 - Another test case for delete trigger
-column 1 on this row is 1
-this delete row will fire the delete trigger which will delete all the rows
from the table and from the resultset
-expected exception Invalid cursor state - no current row.
-Verify that delete trigger got fired by verifying the row count to be 0 in
anotherTableWithDeleteTriggers
- 1
- -
- {0}
----Positive Test14 - make sure self referential delete cascade works when
deleteRow is issued
-column 1 on this row is e1
-this delete row will cause the delete cascade constraint to delete all the
rows from the table and from the resultset
-expected exception Invalid cursor state - no current row.
-Verify that delete trigger got fired by verifying the row count to be 0 in
anotherTableWithDeleteTriggers
- 1
- -
- {0}
----Positive Test15 - With autocommit off, attempt to drop a table when there
is an open updatable resultset on it
-Opened an updatable resultset. Now trying to drop that table through another
Statement
-expected exception Operation 'DROP TABLE' cannot be performed on object 'T1'
because there is an open ResultSet dependent on that object.
-Since autocommit is off, the drop table exception will NOT result in a runtime
rollback and hence updatable resultset object is still open
----Positive Test16 - Do deleteRow within a transaction and then rollback the
transaction
-Verify that before delete trigger got fired, row count is 0 in
deleteTriggerInsertIntoThisTable
- 1
- -
- {0}
-Verify that before deleteRow, row count is 4 in tableWithDeleteTriggers
- 1
- -
- {4}
-column 1 on this row is 1
-now try to delete row and make sure that trigger got fired
-Verify that delete trigger got fired by verifying the row count to be 1 in
deleteTriggerInsertIntoThisTable
- 1
- -
- {1}
-Verify that deleteRow in transaction, row count is 3 in tableWithDeleteTriggers
- 1
- -
- {3}
-Verify that after rollback, row count is back to 0 in
deleteTriggerInsertIntoThisTable
- 1
- -
- {0}
-Verify that after rollback, row count is back to 4 in tableWithDeleteTriggers
- 1
- -
- {4}
----Positive Test17 - After deleteRow, resultset is positioned before the next
row
-getXXX right after deleteRow will fail because resultset is not positioned on
a row, instead it is right before the next row
-expected exception Invalid cursor state - no current row.
-Finished testing updateable resultsets
+Start testing delete and update using JDBC2.0 updateable resultset apis
+---Negative Testl - request for scroll insensitive updatable resultset will
give a read only scroll insensitive resultset
+warnings on connection = SQL Warning: Scroll sensitive and scroll insensitive
updatable ResultSets are not currently implemented.
+requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
+Make sure that we got TYPE_SCROLL_INSENSITIVE? true
+Make sure that we got CONCUR_READ_ONLY? true
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+JDBC 2.0 updatable resultset api will fail on this resultset because this is
not an updatable resultset
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test2 - request for scroll sensitive updatable resultset will give
a read only scroll insensitive resultset
+requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
+Make sure that we got TYPE_SCROLL_INSENSITIVE? true
+Make sure that we got CONCUR_READ_ONLY? true
+JDBC 2.0 updatable resultset api will fail on this resultset because this is
not an updatable resultset
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test3 - request a read only resultset and attempt deleteRow and
updateRow on it
+Make sure that we got CONCUR_READ_ONLY? true
+Now attempting to send a deleteRow on a read only resultset.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send an updateRow on a read only resultset.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test4 - request a read only resultset and send a sql with FOR
UPDATE clause and attempt deleteRow/updateRow on it
+Make sure that we got CONCUR_READ_ONLY? true
+Now attempting to send a deleteRow on a read only resultset with FOR UPDATE
clause in the SELECT sql.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send a updateRow on a read only resultset with FOR UPDATE
clause in the SELECT sql.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test5 - request updatable resultset for sql with no FOR UPDATE
clause
+Make sure that we got CONCUR_READ_ONLY? true
+Expected warnings on resultset = java.sql.SQLWarning: ResultSet not updatable.
Query does not qualify to generate an updatable ResultSet.
+Now attempting to send a delete on a sql with no FOR UPDATE clause.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send a updateRow on a sql with no FOR UPDATE clause.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test6 - request updatable resultset for sql with FOR READ ONLY
clause
+Make sure that we got CONCUR_READ_ONLY? true
+Expected warnings on resultset = java.sql.SQLWarning: ResultSet not updatable.
Query does not qualify to generate an updatable ResultSet.
+Now attempting to send a delete on a sql with FOR READ ONLY clause.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send a updateRow on a sql with FOR READ ONLY clause.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test7 - attempt to deleteRow & updateRow on updatable resultset
when the resultset is not positioned on a row
+Make sure that we got CONCUR_UPDATABLE? true
+Now attempt a deleteRow without first doing next on the resultset.
+Got expected exception Invalid cursor state - no current row.
+Now attempt a updateRow without first doing next on the resultset.
+Got expected exception Invalid cursor state - no current row.
+ResultSet is positioned after the last row. attempt to deleteRow at this point
should fail!
+Got expected exception Invalid cursor state - no current row.
+ResultSet is positioned after the last row. attempt to updateRow at this point
should fail!
+Got expected exception Invalid cursor state - no current row.
+---Negative Test8 - attempt deleteRow & updateRow on updatable resultset after
closing the resultset
+Make sure that we got CONCUR_UPDATABLE? true
+Got expected exception ResultSet not open, operation 'deleteRow' not
permitted. Verify that autocommit is OFF.
+Got expected exception ResultSet not open, operation 'updateRow' not
permitted. Verify that autocommit is OFF.
+---Negative Test9 - try updatable resultset on system table
+expected exception FOR UPDATE is not permitted on this type of statement.
+---Negative Test10 - try updatable resultset on a view
+expected exception FOR UPDATE is not permitted on this type of statement.
+---Negative Test11 - attempt to open updatable resultset when there is join in
the select query should fail
+expected exception FOR UPDATE is not permitted on this type of statement.
+---Negative Test12 - With autocommit on, attempt to drop a table when there is
an open updatable resultset on it
+Opened an updatable resultset. Now trying to drop that table through another
Statement
+expected exception Operation 'DROP TABLE' cannot be performed on object 'T1'
because there is an open ResultSet dependent on that object.
+Since autocommit is on, the drop table exception resulted in a runtime
rollback causing updatable resultset object to close
+expected exception ResultSet not open, operation 'updateRow' not permitted.
Verify that autocommit is OFF.
+expected exception ResultSet not open, operation 'deleteRow' not permitted.
Verify that autocommit is OFF.
+---Negative Test13 - foreign key constraint failure will cause deleteRow to
fail
+expected exception DELETE on table 'TABLEWITHPRIMARYKEY' caused a violation of
foreign key constraint 'FK' for key (1,1). The statement has been rolled back.
+Since autocommit is on, the constraint exception resulted in a runtime
rollback causing updatable resultset object to close
+expected exception ResultSet not open, operation 'next' not permitted. Verify
that autocommit is OFF.
+---Negative Test14 - foreign key constraint failure will cause updateRow to
fail
+expected exception UPDATE on table 'TABLEWITHPRIMARYKEY' caused a violation of
foreign key constraint 'FK' for key (1,1). The statement has been rolled back.
+Since autocommit is on, the constraint exception resulted in a runtime
rollback causing updatable resultset object to close
+expected exception ResultSet not open, operation 'next' not permitted. Verify
that autocommit is OFF.
+---Negative Test15 - Can't call updateXXX methods on columns that do not
correspond to a column in the table
+expected exception Column does not correspond to a column in the base table.
Cant issue {0} on this column.
+---Negative Test16 - Call updateXXX method on out of the range column
+There are only 2 columns in the select list and we are trying to send
updateXXX on column position 3
+expected exception The column position '3' is out of range. The number of
columns for this ResultSet is '2'.
+---Positive Test1a - request updatable resultset for forward only type
resultset
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+JDBC 2.0 updatable resultset apis on this ResultSet object will pass because
this is an updatable resultset
+column 1 on this row before deleteRow is 1
+column 2 on this row before deleteRow is aa
+Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to deletRow() on the current row now
+---Positive Test1b - request updatable resultset for forward only type
resultset
+column 1 on this row before updateInt is 1
+column 1 on this row after updateInt is 234
+column 2 on this row before updateString is aa
+now updateRow on the row
+Since after updateRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling updateRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to updateRow() on the current row now
+---Positive Test2 - even if no columns from table specified in the column
list, we should be able to get updatable resultset
+total number of rows in T1
+ 1
+ -
+ {3}
+column 1 on this row is 1
+total number of rows in T1 after one deleteRow is
+ 1
+ -
+ {2}
+---Positive Test3a - use prepared statement with concur updatable status to
test deleteRow
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+column 1 on this row is 1
+Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to deletRow() on the current row now
+---Positive Test3b - use prepared statement with concur updatable status to
test updateXXX
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+column 1 on this row is 1
+column 1 on this row after updateInt is 5
+Since after updateRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling updateRow/updateXXX again w/o first positioning the ResultSet on the
next row will fail
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to cancelRowUpdates() on the current row now
+---Positive Test4 - use callable statement with concur updatable status
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+column 1 on this row is 1
+Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to deletRow() on the current row now
+---Positive Test5 - donot have to select primary key to get an updatable
resultset
+column 1 on this row is 1
+now try to delete row when primary key is not selected for that row
+---Positive Test6a - For Forward Only resultsets, DatabaseMetaData will return
false for ownDeletesAreVisible and deletesAreDetected
+---This is because, after deleteRow, we position the ResultSet before the next
row. We don't make a hole for the deleted row and then stay on that deleted hole
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+The JDBC program should look at rowDeleted only if deletesAreDetected returns
true
+Since Derby returns false for detlesAreDetected for FORWARD_ONLY updatable
resultset,the program should not rely on rs.rowDeleted() for FORWARD_ONLY
updatable resultsets
+Have this call to rs.rowDeleted() just to make sure the method does always
return false? false
+Have this call to rs.rowDeleted() just to make sure the method does always
return false? false
+---Positive Test6b - For Forward Only resultsets, DatabaseMetaData will return
false for ownUpdatesAreVisible and updatesAreDetected
+---This is because, after updateRow, we position the ResultSet before the next
row
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+The JDBC program should look at rowUpdated only if updatesAreDetected returns
true
+Since Derby returns false for updatesAreDetected for FORWARD_ONLY updatable
resultset,the program should not rely on rs.rowUpdated() for FORWARD_ONLY
updatable resultsets
+Have this call to rs.rowUpdated() just to make sure the method does always
return false? false
+Have this call to rs.rowUpdated() just to make sure the method does always
return false? false
+---Positive Test7a - delete using updatable resultset api from a temporary
table
+following rows in temp table before deleteRow
+ C21,C22
+ --- ---
+ {21,1}
+ {22,1}
+As expected, no rows in temp table after deleteRow
+ C21,C22
+ --- ---
+---Positive Test7b - update using updatable resultset api from a temporary
table
+following rows in temp table before deleteRow
+ C31,C32
+ --- ---
+ {21,1}
+ {22,1}
+As expected, updated rows in temp table after updateRow
+ C31,C32
+ --- ---
+ {123,1}
+ {123,1}
+---Positive Test8a - change the name of the resultset and see if deleteRow
still works
+change the cursor name(case sensitive name) with setCursorName and then try to
deleteRow
+change the cursor name one more time with setCursorName and then try to
deleteRow
+---Positive Test8b - change the name of the resultset and see if updateRow
still works
+change the cursor name one more time with setCursorName and then try to
updateRow
+change the cursor name(case sensitive name) with setCursorName and then try to
updateRow
+---Positive Test9a - using correlation name for the table in the select sql is
not a problem
+column 1 on this row is 1
+now try to deleteRow
+---Positive Test9b - using correlation name for column names is not allowed
with updateXXX
+Table t1 has following rows
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+column 1 on this row is 1
+attempt to send updateXXX on correlation name column will fail
+Got expected exception Column does not correspond to a column in the base
table. Cant issue {0} on this column.
+Table t1 after updateRow has following rows
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+---Positive Test10 - 2 updatable resultsets going against the same table, will
they conflict?
+delete using first resultset
+attempt to send deleteRow on the same row through a different resultset should
throw an exception
+Got expected exception Cursor 'SQLCUR16' is not on a row.
+Move to next row in the 2nd resultset and then delete using the second
resultset
+---Positive Test11 - setting the fetch size to > 1 will be ignored by
updatable resultset. Same as updatable cursors
+Notice the Fetch Size in run time statistics output.
+1
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name:
+ null
+Statement Text:
+ SELECT 1, 2 FROM t1 FOR UPDATE of c1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text:
+Project-Restrict ResultSet (3):
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+restriction = false
+projection = true
+ constructor time (milliseconds) = 0
+ open time (milliseconds) = 0
+ next time (milliseconds) = 0
+ close time (milliseconds) = 0
+ restriction time (milliseconds) = 0
+ projection time (milliseconds) = 0
+Source result set:
+ Project-Restrict ResultSet (2):
+ Number of opens = 1
+ Rows seen = 0
+ Rows filtered = 0
+ restriction = false
+ projection = true
+ constructor time (milliseconds) = 0
+ open time (milliseconds) = 0
+ next time (milliseconds) = 0
+ close time (milliseconds) = 0
+ restriction time (milliseconds) = 0
+ projection time (milliseconds) = 0
+ Source result set:
+ Table Scan ResultSet for T1 at read committed isolation level
using exclusive row locking chosen by the optimizer
+ Number of opens = 1
+ Rows seen = 0
+ Rows filtered = 0
+ Fetch Size = 1
+ constructor time (milliseconds) = 0
+ open time (milliseconds) = 0
+ next time (milliseconds) = 0
+ close time (milliseconds) = 0
+ scan information:
+ Bit set of columns fetched=All
+ Number of columns fetched=2
+ Number of pages visited=0
+ Number of rows qualified=0
+ Number of rows visited=0
+ Scan type=heap
+ start position:
+null stop position:
+null qualifiers:
+None
+statement's fetch size is 200
+---Positive Test12a - make sure delete trigger gets fired when deleteRow is
issued
+Verify that before delete trigger got fired, row count is 0 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+column 1 on this row is 1
+now try to delete row and make sure that trigger got fired
+Verify that delete trigger got fired by verifying the row count to be 1 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+---Positive Test12b - make sure update trigger gets fired when updateRow is
issued
+Verify that before update trigger got fired, row count is 0 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+column 1 on this row is 1
+now try to update row and make sure that trigger got fired
+Verify that update trigger got fired by verifying the row count to be 1 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+---Positive Test13a - Another test case for delete trigger
+column 1 on this row is 1
+this delete row will fire the delete trigger which will delete all the rows
from the table and from the resultset
+expected exception Invalid cursor state - no current row.
+Verify that delete trigger got fired by verifying the row count to be 0 in
table1WithTriggers
+ 1
+ -
+ {0}
+---Positive Test13b - Another test case for update trigger
+Look at the current contents of table2WithTriggers
+ C1,C2
+ -- --
+ {1,1}
+ {2,2}
+ {3,3}
+ {4,4}
+column 1 on this row is 2
+this update row will fire the update trigger which will update all the rows in
the table to have c1=1 and hence no more rows will qualify for the resultset
+expected exception Invalid cursor state - no current row.
+Verify that update trigger got fired by verifying that all column c1s have
value 1 in table2WithTriggers
+ C1,C2
+ -- --
+ {1,1}
+ {1,2}
+ {1,3}
+ {1,4}
+---Positive Test14a - make sure self referential delete cascade works when
deleteRow is issued
+ C1,C2
+ -- --
+ {e1,null}
+ {e2,e1}
+ {e3,e2}
+ {e4,e3}
+column 1 on this row is e1
+this delete row will cause the delete cascade constraint to delete all the
rows from the table and from the resultset
+expected exception Invalid cursor state - no current row.
+Verify that delete trigger got fired by verifying the row count to be 0 in
selfReferencingT1
+ 1
+ -
+ {0}
+---Positive Test14b - make sure self referential update restrict works when
updateRow is issued
+ C1,C2
+ -- --
+ {e1,null}
+ {e2,e1}
+ {e3,e2}
+ {e4,e3}
+column 1 on this row is e1
+update row should fail because cascade constraint is update restrict
+expected exception UPDATE on table 'SELFREFERENCINGT2' caused a violation of
foreign key constraint 'MANAGES2' for key (e1). The statement has been rolled
back.
+---Positive Test15 - With autocommit off, attempt to drop a table when there
is an open updatable resultset on it
+Opened an updatable resultset. Now trying to drop that table through another
Statement
+expected exception Operation 'DROP TABLE' cannot be performed on object 'T1'
because there is an open ResultSet dependent on that object.
+Since autocommit is off, the drop table exception will NOT result in a runtime
rollback and hence updatable resultset object is still open
+---Positive Test16a - Do deleteRow within a transaction and then rollback the
transaction
+Verify that before delete trigger got fired, row count is 0 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Verify that before deleteRow, row count is 4 in table0WithTriggers
+ 1
+ -
+ {4}
+column 1 on this row is 1
+now try to delete row and make sure that trigger got fired
+Verify that delete trigger got fired by verifying the row count to be 1 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+Verify that deleteRow in transaction, row count is 3 in table0WithTriggers
+ 1
+ -
+ {3}
+Verify that after rollback, row count is back to 0 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Verify that after rollback, row count is back to 4 in table0WithTriggers
+ 1
+ -
+ {4}
+---Positive Test16b - Do updateRow within a transaction and then rollback the
transaction
+Verify that before update trigger got fired, row count is 0 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Look at the data in table0WithTriggers before trigger gets fired
+ C1,C2
+ -- --
+ {1,1}
+ {2,2}
+ {3,3}
+ {4,4}
+column 1 on this row is 1
+now try to update row and make sure that trigger got fired
+Verify that update trigger got fired by verifying the row count to be 1 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+Verify that new data in table0WithTriggers
+ C1,C2
+ -- --
+ {123,1}
+ {2,2}
+ {3,3}
+ {4,4}
+Verify that after rollback, row count is back to 0 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Verify that after rollback, table0WithTriggers is back to its original contents
+ C1,C2
+ -- --
+ {1,1}
+ {2,2}
+ {3,3}
+ {4,4}
+---Positive Test17 - After deleteRow, resultset is positioned before the next
row
+getXXX right after deleteRow will fail because resultset is not positioned on
a row, instead it is right before the next row
+expected exception Invalid cursor state - no current row.
+---Positive Test18 - Test cancelRowUpdates method as the first updatable
ResultSet api on a read-only resultset
+expected exception 'cancelRowUpdates' not allowed because the ResultSet is not
an updatable ResultSet.
+---Positive Test19 - Test updateRow method as the first updatable ResultSet
api on a read-only resultset
+ Got expected exception : 'updateRow' not allowed because the ResultSet is
not an updatable ResultSet.
+---Positive Test20 - Test updateXXX methods as the first updatable ResultSet
api on a read-only resultset
+ Test updateShort on a readonly resultset
+ Using column position as first parameter to updateShort
+ Got expected exception : 'updateShort' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateShort
+ Got expected exception : 'updateShort' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateInt on a readonly resultset
+ Using column position as first parameter to updateInt
+ Got expected exception : 'updateInt' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateInt
+ Got expected exception : 'updateInt' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateLong on a readonly resultset
+ Using column position as first parameter to updateLong
+ Got expected exception : 'updateLong' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateLong
+ Got expected exception : 'updateLong' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateBigDecimal on a readonly resultset
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : 'updateBigDecimal' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : 'updateBigDecimal' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateFloat on a readonly resultset
+ Using column position as first parameter to updateFloat
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateFloat
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateDouble on a readonly resultset
+ Using column position as first parameter to updateDouble
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateDouble
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateString on a readonly resultset
+ Using column position as first parameter to updateString
+ Got expected exception : 'updateString' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateString
+ Got expected exception : 'updateString' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateAsciiStream on a readonly resultset
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : 'updateAsciiStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : 'updateAsciiStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateCharacterStream on a readonly resultset
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : 'updateCharacterStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : 'updateCharacterStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateByte on a readonly resultset
+ Using column position as first parameter to updateByte
+ Got expected exception : 'updateByte' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateByte
+ Got expected exception : 'updateByte' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateBytes on a readonly resultset
+ Using column position as first parameter to updateBytes
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateBytes
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateBinaryStream on a readonly resultset
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : 'updateBinaryStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : 'updateBinaryStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateClob on a readonly resultset
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Test updateDate on a readonly resultset
+ Using column position as first parameter to updateDate
+ Got expected exception : 'updateDate' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateDate
+ Got expected exception : 'updateDate' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateTime on a readonly resultset
+ Using column position as first parameter to updateTime
+ Got expected exception : 'updateTime' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateTime
+ Got expected exception : 'updateTime' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateTimestamp on a readonly resultset
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet
is not an updatable ResultSet.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet
is not an updatable ResultSet.
+ Test updateBlob on a readonly resultset
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Test updateBoolean on a readonly resultset
+ Using column position as first parameter to updateBoolean
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet
is not an updatable ResultSet.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet
is not an updatable ResultSet.
+ Test updateNull on a readonly resultset
+ Using column position as first parameter to updateNull
+ Got expected exception : 'updateNull' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateNull
+ Got expected exception : 'updateNull' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateArray on a readonly resultset
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Test updateRef on a readonly resultset
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+---Positive Test21 - Test all updateXXX(excluding updateObject) methods on all
the supported sql datatypes
+Next datatype to test is SMALLINT
+ Testing updateShort on SQL type SMALLINT
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type SMALLINT
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type SMALLINT
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type SMALLINT
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type SMALLINT
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type SMALLINT
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type SMALLINT
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR'.
+ Testing updateAsciiStream on SQL type SMALLINT
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type SMALLINT
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type SMALLINT
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type SMALLINT
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type SMALLINT
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type SMALLINT
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type SMALLINT
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'DATE'.
+ Testing updateTime on SQL type SMALLINT
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIME'.
+ Testing updateTimestamp on SQL type SMALLINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type SMALLINT
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type SMALLINT
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type SMALLINT
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type SMALLINT
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type SMALLINT
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is INTEGER
+ Testing updateShort on SQL type INTEGER
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type INTEGER
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type INTEGER
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type INTEGER
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type INTEGER
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type INTEGER
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type INTEGER
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type INTEGER
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type INTEGER
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type INTEGER
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type INTEGER
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type INTEGER
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type INTEGER
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type INTEGER
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type INTEGER
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type INTEGER
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type INTEGER
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type INTEGER
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type INTEGER
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type INTEGER
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type INTEGER
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is BIGINT
+ Testing updateShort on SQL type BIGINT
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type BIGINT
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type BIGINT
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type BIGINT
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type BIGINT
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type BIGINT
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type BIGINT
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type BIGINT
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type BIGINT
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type BIGINT
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type BIGINT
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type BIGINT
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type BIGINT
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type BIGINT
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type BIGINT
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type BIGINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type BIGINT
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type BIGINT
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type BIGINT
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type BIGINT
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type BIGINT
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is DECIMAL(10,5)
+ Testing updateShort on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is REAL
+ Testing updateShort on SQL type REAL
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type REAL
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type REAL
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type REAL
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type REAL
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type REAL
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type REAL
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type REAL
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type REAL
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type REAL
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type REAL
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type REAL
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type REAL
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type REAL
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type REAL
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type REAL
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type REAL
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type REAL
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type REAL
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type REAL
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type REAL
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is DOUBLE
+ Testing updateShort on SQL type DOUBLE
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type DOUBLE
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type DOUBLE
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type DOUBLE
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type DOUBLE
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type DOUBLE
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type DOUBLE
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type DOUBLE
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type DOUBLE
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type DOUBLE
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type DOUBLE
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type DOUBLE
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type DOUBLE
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type DOUBLE
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type DOUBLE
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type DOUBLE
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type DOUBLE
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type DOUBLE
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type DOUBLE
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type DOUBLE
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type DOUBLE
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is CHAR(60)
+ Testing updateShort on SQL type CHAR(60)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type CHAR(60)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type CHAR(60)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type CHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type CHAR(60)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type CHAR(60)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type CHAR(60)
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type CHAR(60)
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type CHAR(60)
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type CHAR(60)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type CHAR(60)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type CHAR(60)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type CHAR(60)
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type CHAR(60)
+ Using column position as first parameter to updateDate
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type CHAR(60)
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type CHAR(60)
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ Testing updateBlob on SQL type CHAR(60)
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type CHAR(60)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type CHAR(60)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type CHAR(60)
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type CHAR(60)
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is VARCHAR(60)
+ Testing updateShort on SQL type VARCHAR(60)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type VARCHAR(60)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type VARCHAR(60)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type VARCHAR(60)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type VARCHAR(60)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type VARCHAR(60)
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type VARCHAR(60)
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type VARCHAR(60)
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type VARCHAR(60)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type VARCHAR(60)
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type VARCHAR(60)
+ Using column position as first parameter to updateDate
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type VARCHAR(60)
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type VARCHAR(60)
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ Testing updateBlob on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type VARCHAR(60)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type VARCHAR(60)
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type VARCHAR(60)
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is LONG VARCHAR
+ Testing updateShort on SQL type LONG VARCHAR
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateInt on SQL type LONG VARCHAR
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateLong on SQL type LONG VARCHAR
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Testing updateFloat on SQL type LONG VARCHAR
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Testing updateDouble on SQL type LONG VARCHAR
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Testing updateString on SQL type LONG VARCHAR
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type LONG VARCHAR
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type LONG VARCHAR
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type LONG VARCHAR
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateBytes on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type LONG VARCHAR
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type LONG VARCHAR
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DATE'.
+ Testing updateTime on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIME'.
+ Testing updateTimestamp on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type LONG VARCHAR
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type LONG VARCHAR
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type LONG VARCHAR
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is CHAR(2) FOR BIT DATA
+ Testing updateShort on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateInt on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateLong on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Testing updateFloat on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Testing updateDouble on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Testing updateString on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ Testing updateAsciiStream on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateBytes on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ Testing updateBinaryStream on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ Testing updateTime on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ Testing updateTimestamp on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is VARCHAR(2) FOR BIT DATA
+ Testing updateShort on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateInt on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateLong on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateFloat on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateDouble on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateString on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Testing updateAsciiStream on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBytes on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ Testing updateBinaryStream on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Testing updateTime on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Testing updateTimestamp on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is LONG VARCHAR FOR BIT DATA
+ Testing updateShort on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateInt on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateLong on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateFloat on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateDouble on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateString on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Testing updateAsciiStream on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBytes on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ Testing updateBinaryStream on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Testing updateTime on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Testing updateTimestamp on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is CLOB(1k)
+ Testing updateShort on SQL type CLOB(1k)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type CLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type CLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type CLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type CLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type CLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type CLOB(1k)
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type CLOB(1k)
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type CLOB(1k)
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type CLOB(1k)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type CLOB(1k)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type CLOB(1k)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type CLOB(1k)
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type CLOB(1k)
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type CLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type CLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type CLOB(1k)
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type CLOB(1k)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type CLOB(1k)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type CLOB(1k)
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type CLOB(1k)
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is DATE
+ Testing updateShort on SQL type DATE
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type DATE
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type DATE
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type DATE
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type DATE
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type DATE
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type DATE
+ Using column position as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Using column name as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Testing updateAsciiStream on SQL type DATE
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type DATE
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type DATE
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type DATE
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type DATE
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type DATE
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type DATE
+ Using column position as first parameter to updateDate
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type DATE
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type DATE
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type DATE
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type DATE
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type DATE
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type DATE
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type DATE
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is TIME
+ Testing updateShort on SQL type TIME
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type TIME
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type TIME
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type TIME
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type TIME
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type TIME
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type TIME
+ Using column position as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Using column name as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Testing updateAsciiStream on SQL type TIME
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type TIME
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type TIME
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type TIME
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type TIME
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type TIME
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type TIME
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type TIME
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type TIME
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type TIME
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type TIME
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type TIME
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type TIME
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type TIME
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is TIMESTAMP
+ Testing updateShort on SQL type TIMESTAMP
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateInt on SQL type TIMESTAMP
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateLong on SQL type TIMESTAMP
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type TIMESTAMP
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Testing updateFloat on SQL type TIMESTAMP
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Testing updateDouble on SQL type TIMESTAMP
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Testing updateString on SQL type TIMESTAMP
+ Using column position as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Using column name as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Testing updateAsciiStream on SQL type TIMESTAMP
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type TIMESTAMP
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type TIMESTAMP
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateBytes on SQL type TIMESTAMP
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type TIMESTAMP
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type TIMESTAMP
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type TIMESTAMP
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DATE'.
+ Testing updateTime on SQL type TIMESTAMP
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'TIME'.
+ Testing updateTimestamp on SQL type TIMESTAMP
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ Testing updateBlob on SQL type TIMESTAMP
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type TIMESTAMP
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type TIMESTAMP
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type TIMESTAMP
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type TIMESTAMP
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+Next datatype to test is BLOB(1k)
+ Testing updateShort on SQL type BLOB(1k)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type BLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type BLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type BLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type BLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type BLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type BLOB(1k)
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type BLOB(1k)
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type BLOB(1k)
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type BLOB(1k)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type BLOB(1k)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type BLOB(1k)
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type BLOB(1k)
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type BLOB(1k)
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type BLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type BLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type BLOB(1k)
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type BLOB(1k)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type BLOB(1k)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type BLOB(1k)
+ Using column position as first parameter to updateArray
+ Using column name as first parameter to updateArray
+ Testing updateRef on SQL type BLOB(1k)
+ Using column position as first parameter to updateRef
+ Using column name as first parameter to updateRef
+---Positive Test22 - Test updateObject method
+Next datatype to test is SMALLINT
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is INTEGER
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is BIGINT
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is DECIMAL(10,5)
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is REAL
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is DOUBLE
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is CHAR(60)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ updateObject with column name & Date object as parameters
+ updateObject with column position & Time object as parameters
+ updateObject with column name & Time object as parameters
+ updateObject with column position & TimeStamp object as parameters
+ updateObject with column name & TimeStamp object as parameters
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is VARCHAR(60)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ updateObject with column name & Date object as parameters
+ updateObject with column position & Time object as parameters
+ updateObject with column name & Time object as parameters
+ updateObject with column position & TimeStamp object as parameters
+ updateObject with column name & TimeStamp object as parameters
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is LONG VARCHAR
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is CHAR(2) FOR BIT DATA
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is VARCHAR(2) FOR BIT DATA
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is LONG VARCHAR FOR BIT DATA
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is CLOB(1k)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is DATE
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column name & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ updateObject with column name & Date object as parameters
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is TIME
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column name & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ updateObject with column name & Time object as parameters
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is TIMESTAMP
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column name & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ updateObject with column name & TimeStamp object as parameters
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is BLOB(1k)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+---Positive Test23 - Test cancelRowUpdates after updateXXX methods on all the
supported sql datatypes
+ updateShort and then cancelRowUpdates
+ updateInt and then cancelRowUpdates
+ updateLong and then cancelRowUpdates
+ updateBigDecimal and then cancelRowUpdates
+ updateFloat and then cancelRowUpdates
+ updateDouble and then cancelRowUpdates
+ updateString and then cancelRowUpdates
+ updateAsciiStream and then cancelRowUpdates
+ updateCharacterStream and then cancelRowUpdates
+ updateByte and then cancelRowUpdates
+ updateBytes and then cancelRowUpdates
+ updateBinaryStream and then cancelRowUpdates
+ updateDate and then cancelRowUpdates
+ updateTime and then cancelRowUpdates
+ updateTimestamp and then cancelRowUpdates
+---Positive Test24a - after updateXXX, try cancelRowUpdates and then deleteRow
+column 1 on this row before updateInt is 1
+column 1 on this row after updateInt is 234
+now cancelRowUpdates on the row
+Since after cancelRowUpdates(), ResultSet is positioned on the same row,
getXXX will pass
+column 1 on this row after cancelRowUpdates is 1
+Since after cancelRowUpdates(), ResultSet is positioned on the same row, a
deleteRow at this point will pass
+PASS : deleteRow passed as expected
+calling updateRow after deleteRow w/o first positioning the ResultSet on the
next row will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to updateRow() on the current row now
+---Positive Test25 - issue cancelRowUpdates without any updateXXX
+---Positive Test26 - issue updateRow without any updateXXX will not move the
resultset position
+---Positive Test27 - issue updateXXX and then deleteRow
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+---Positive Test28 - issue updateXXXs and then move off the row, the changes
should be ignored
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+ column 1 on this row before updateInt is 1
+ Issue updateInt to change the column's value to 2345
+ Move to next row w/o issuing updateRow
+ Make sure that changes didn't make it to the database
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+---Positive Test29 - issue multiple updateXXXs and then a updateRow
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+ column 1 on this row before updateInt is 1
+ Issue updateInt to change the column's value to 2345
+ Issue another updateInt on the same row and column to change the column's
value to 9999
+ Issue updateString to change the column's value to 'xxxxxxx'
+ Now issue updateRow
+ Make sure that changes made it to the database correctly
+ C1,C2
+ -- --
+ {9999,xxxxxxx }
+ {2,bb }
+ {3,cc }
+---Positive Test30 - call updateXXX methods on only columns that correspond to
a column in the table
+ C1,C2
+ -- --
+ {9999,xxxxxxx }
+ {2,bb }
+ {3,cc }
+ Make sure that changes made it to the database correctly
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+Finished testing updateable resultsets
Index:
java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
(revision 0)
@@ -0,0 +1,3145 @@
+Start testing delete and update using JDBC2.0 updateable resultset apis
+---Negative Testl - request for scroll insensitive updatable resultset will
give a read only scroll insensitive resultset
+warnings on connection = SQL Warning: Scroll sensitive and scroll insensitive
updatable ResultSets are not currently implemented.
+requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
+Make sure that we got TYPE_SCROLL_INSENSITIVE? true
+Make sure that we got CONCUR_READ_ONLY? true
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+JDBC 2.0 updatable resultset api will fail on this resultset because this is
not an updatable resultset
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test2 - request for scroll sensitive updatable resultset will give
a read only scroll insensitive resultset
+requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
+Make sure that we got TYPE_SCROLL_INSENSITIVE? true
+Make sure that we got CONCUR_READ_ONLY? true
+JDBC 2.0 updatable resultset api will fail on this resultset because this is
not an updatable resultset
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test3 - request a read only resultset and attempt deleteRow and
updateRow on it
+Make sure that we got CONCUR_READ_ONLY? true
+Now attempting to send a deleteRow on a read only resultset.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send an updateRow on a read only resultset.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test4 - request a read only resultset and send a sql with FOR
UPDATE clause and attempt deleteRow/updateRow on it
+Make sure that we got CONCUR_READ_ONLY? true
+Now attempting to send a deleteRow on a read only resultset with FOR UPDATE
clause in the SELECT sql.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send a updateRow on a read only resultset with FOR UPDATE
clause in the SELECT sql.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test5 - request updatable resultset for sql with no FOR UPDATE
clause
+Make sure that we got CONCUR_READ_ONLY? true
+Expected warnings on resultset = java.sql.SQLWarning: ResultSet not updatable.
Query does not qualify to generate an updatable ResultSet.
+Now attempting to send a delete on a sql with no FOR UPDATE clause.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send a updateRow on a sql with no FOR UPDATE clause.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test6 - request updatable resultset for sql with FOR READ ONLY
clause
+Make sure that we got CONCUR_READ_ONLY? true
+Expected warnings on resultset = java.sql.SQLWarning: ResultSet not updatable.
Query does not qualify to generate an updatable ResultSet.
+Now attempting to send a delete on a sql with FOR READ ONLY clause.
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an
updatable ResultSet.
+Now attempting to send a updateRow on a sql with FOR READ ONLY clause.
+Got expected exception 'updateRow' not allowed because the ResultSet is not an
updatable ResultSet.
+---Negative Test7 - attempt to deleteRow & updateRow on updatable resultset
when the resultset is not positioned on a row
+Make sure that we got CONCUR_UPDATABLE? true
+Now attempt a deleteRow without first doing next on the resultset.
+Got expected exception Invalid cursor state - no current row.
+Now attempt a updateRow without first doing next on the resultset.
+Got expected exception Invalid cursor state - no current row.
+ResultSet is positioned after the last row. attempt to deleteRow at this point
should fail!
+Got expected exception Invalid cursor state - no current row.
+ResultSet is positioned after the last row. attempt to updateRow at this point
should fail!
+Got expected exception Invalid cursor state - no current row.
+---Negative Test8 - attempt deleteRow & updateRow on updatable resultset after
closing the resultset
+Make sure that we got CONCUR_UPDATABLE? true
+Got expected exception ResultSet not open, operation 'deleteRow' not
permitted. Verify that autocommit is OFF.
+Got expected exception ResultSet not open, operation 'updateRow' not
permitted. Verify that autocommit is OFF.
+---Negative Test9 - try updatable resultset on system table
+expected exception FOR UPDATE is not permitted on this type of statement.
+---Negative Test10 - try updatable resultset on a view
+expected exception FOR UPDATE is not permitted on this type of statement.
+---Negative Test11 - attempt to open updatable resultset when there is join in
the select query should fail
+expected exception FOR UPDATE is not permitted on this type of statement.
+---Negative Test12 - With autocommit on, attempt to drop a table when there is
an open updatable resultset on it
+Opened an updatable resultset. Now trying to drop that table through another
Statement
+expected exception Operation 'DROP TABLE' cannot be performed on object 'T1'
because there is an open ResultSet dependent on that object.
+Since autocommit is on, the drop table exception resulted in a runtime
rollback causing updatable resultset object to close
+expected exception ResultSet not open, operation 'updateRow' not permitted.
Verify that autocommit is OFF.
+expected exception ResultSet not open, operation 'deleteRow' not permitted.
Verify that autocommit is OFF.
+---Negative Test13 - foreign key constraint failure will cause deleteRow to
fail
+expected exception DELETE on table 'TABLEWITHPRIMARYKEY' caused a violation of
foreign key constraint 'FK' for key (1,1). The statement has been rolled back.
+Since autocommit is on, the constraint exception resulted in a runtime
rollback causing updatable resultset object to close
+expected exception ResultSet not open, operation 'next' not permitted. Verify
that autocommit is OFF.
+---Negative Test14 - foreign key constraint failure will cause updateRow to
fail
+expected exception UPDATE on table 'TABLEWITHPRIMARYKEY' caused a violation of
foreign key constraint 'FK' for key (1,1). The statement has been rolled back.
+Since autocommit is on, the constraint exception resulted in a runtime
rollback causing updatable resultset object to close
+expected exception ResultSet not open, operation 'next' not permitted. Verify
that autocommit is OFF.
+---Negative Test15 - Can't call updateXXX methods on columns that do not
correspond to a column in the table
+expected exception Column does not correspond to a column in the base table.
Cant issue {0} on this column.
+---Negative Test16 - Call updateXXX method on out of the range column
+There are only 2 columns in the select list and we are trying to send
updateXXX on column position 3
+expected exception The column position '3' is out of range. The number of
columns for this ResultSet is '2'.
+---Positive Test1a - request updatable resultset for forward only type
resultset
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+JDBC 2.0 updatable resultset apis on this ResultSet object will pass because
this is an updatable resultset
+column 1 on this row before deleteRow is 1
+column 2 on this row before deleteRow is aa
+Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to deletRow() on the current row now
+---Positive Test1b - request updatable resultset for forward only type
resultset
+column 1 on this row before updateInt is 1
+column 1 on this row after updateInt is 234
+column 2 on this row before updateString is aa
+now updateRow on the row
+Since after updateRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling updateRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to updateRow() on the current row now
+---Positive Test2 - even if no columns from table specified in the column
list, we should be able to get updatable resultset
+total number of rows in T1
+ 1
+ -
+ {3}
+column 1 on this row is 1
+total number of rows in T1 after one deleteRow is
+ 1
+ -
+ {2}
+---Positive Test3a - use prepared statement with concur updatable status to
test deleteRow
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+column 1 on this row is 1
+Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to deletRow() on the current row now
+---Positive Test3b - use prepared statement with concur updatable status to
test updateXXX
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+column 1 on this row is 1
+column 1 on this row after updateInt is 5
+Since after updateRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling updateRow/updateXXX again w/o first positioning the ResultSet on the
next row will fail
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to cancelRowUpdates() on the current row now
+---Positive Test4 - use callable statement with concur updatable status
+requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE
+got TYPE_FORWARD_ONLY? true
+got CONCUR_UPDATABLE? true
+column 1 on this row is 1
+Since after deleteRow(), ResultSet is positioned before the next row, getXXX
will fail
+Got expected exception Invalid cursor state - no current row.
+calling deleteRow again w/o first positioning the ResultSet on the next row
will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to deletRow() on the current row now
+---Positive Test5 - donot have to select primary key to get an updatable
resultset
+column 1 on this row is 1
+now try to delete row when primary key is not selected for that row
+---Positive Test6a - For Forward Only resultsets, DatabaseMetaData will return
false for ownDeletesAreVisible and deletesAreDetected
+---This is because, after deleteRow, we position the ResultSet before the next
row. We don't make a hole for the deleted row and then stay on that deleted hole
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+The JDBC program should look at rowDeleted only if deletesAreDetected returns
true
+Since Derby returns false for detlesAreDetected for FORWARD_ONLY updatable
resultset,the program should not rely on rs.rowDeleted() for FORWARD_ONLY
updatable resultsets
+Have this call to rs.rowDeleted() just to make sure the method does always
return false? false
+Have this call to rs.rowDeleted() just to make sure the method does always
return false? false
+---Positive Test6b - For Forward Only resultsets, DatabaseMetaData will return
false for ownUpdatesAreVisible and updatesAreDetected
+---This is because, after updateRow, we position the ResultSet before the next
row
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+The JDBC program should look at rowUpdated only if updatesAreDetected returns
true
+Since Derby returns false for updatesAreDetected for FORWARD_ONLY updatable
resultset,the program should not rely on rs.rowUpdated() for FORWARD_ONLY
updatable resultsets
+Have this call to rs.rowUpdated() just to make sure the method does always
return false? false
+Have this call to rs.rowUpdated() just to make sure the method does always
return false? false
+---Positive Test7a - delete using updatable resultset api from a temporary
table
+following rows in temp table before deleteRow
+ C21,C22
+ --- ---
+ {21,1}
+ {22,1}
+As expected, no rows in temp table after deleteRow
+ C21,C22
+ --- ---
+---Positive Test7b - update using updatable resultset api from a temporary
table
+following rows in temp table before deleteRow
+ C31,C32
+ --- ---
+ {21,1}
+ {22,1}
+As expected, updated rows in temp table after updateRow
+ C31,C32
+ --- ---
+ {123,1}
+ {123,1}
+---Positive Test8a - change the name of the resultset and see if deleteRow
still works
+change the cursor name(case sensitive name) with setCursorName and then try to
deleteRow
+change the cursor name one more time with setCursorName and then try to
deleteRow
+---Positive Test8b - change the name of the resultset and see if updateRow
still works
+change the cursor name one more time with setCursorName and then try to
updateRow
+change the cursor name(case sensitive name) with setCursorName and then try to
updateRow
+---Positive Test9a - using correlation name for the table in the select sql is
not a problem
+column 1 on this row is 1
+now try to deleteRow
+---Positive Test9b - using correlation name for column names is not allowed
with updateXXX
+Table t1 has following rows
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+column 1 on this row is 1
+attempt to send updateXXX on correlation name column will fail
+Got expected exception Column does not correspond to a column in the base
table. Cant issue {0} on this column.
+Table t1 after updateRow has following rows
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+---Positive Test10 - 2 updatable resultsets going against the same table, will
they conflict?
+delete using first resultset
+attempt to send deleteRow on the same row through a different resultset should
throw an exception
+Got expected exception Cursor 'SQLCUR16' is not on a row.
+Move to next row in the 2nd resultset and then delete using the second
resultset
+---Positive Test11 - setting the fetch size to > 1 will be ignored by
updatable resultset. Same as updatable cursors
+Notice the Fetch Size in run time statistics output.
+1
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name:
+ null
+Statement Text:
+ SELECT 1, 2 FROM t1 FOR UPDATE of c1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text:
+Project-Restrict ResultSet (3):
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+restriction = false
+projection = true
+ constructor time (milliseconds) = 0
+ open time (milliseconds) = 0
+ next time (milliseconds) = 0
+ close time (milliseconds) = 0
+ restriction time (milliseconds) = 0
+ projection time (milliseconds) = 0
+Source result set:
+ Project-Restrict ResultSet (2):
+ Number of opens = 1
+ Rows seen = 0
+ Rows filtered = 0
+ restriction = false
+ projection = true
+ constructor time (milliseconds) = 0
+ open time (milliseconds) = 0
+ next time (milliseconds) = 0
+ close time (milliseconds) = 0
+ restriction time (milliseconds) = 0
+ projection time (milliseconds) = 0
+ Source result set:
+ Table Scan ResultSet for T1 at read committed isolation level
using exclusive row locking chosen by the optimizer
+ Number of opens = 1
+ Rows seen = 0
+ Rows filtered = 0
+ Fetch Size = 1
+ constructor time (milliseconds) = 0
+ open time (milliseconds) = 0
+ next time (milliseconds) = 0
+ close time (milliseconds) = 0
+ scan information:
+ Bit set of columns fetched=All
+ Number of columns fetched=2
+ Number of pages visited=0
+ Number of rows qualified=0
+ Number of rows visited=0
+ Scan type=heap
+ start position:
+null stop position:
+null qualifiers:
+None
+statement's fetch size is 200
+---Positive Test12a - make sure delete trigger gets fired when deleteRow is
issued
+Verify that before delete trigger got fired, row count is 0 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+column 1 on this row is 1
+now try to delete row and make sure that trigger got fired
+Verify that delete trigger got fired by verifying the row count to be 1 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+---Positive Test12b - make sure update trigger gets fired when updateRow is
issued
+Verify that before update trigger got fired, row count is 0 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+column 1 on this row is 1
+now try to update row and make sure that trigger got fired
+Verify that update trigger got fired by verifying the row count to be 1 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+---Positive Test13a - Another test case for delete trigger
+column 1 on this row is 1
+this delete row will fire the delete trigger which will delete all the rows
from the table and from the resultset
+expected exception Invalid cursor state - no current row.
+Verify that delete trigger got fired by verifying the row count to be 0 in
table1WithTriggers
+ 1
+ -
+ {0}
+---Positive Test13b - Another test case for update trigger
+Look at the current contents of table2WithTriggers
+ C1,C2
+ -- --
+ {1,1}
+ {2,2}
+ {3,3}
+ {4,4}
+column 1 on this row is 2
+this update row will fire the update trigger which will update all the rows in
the table to have c1=1 and hence no more rows will qualify for the resultset
+expected exception Invalid cursor state - no current row.
+Verify that update trigger got fired by verifying that all column c1s have
value 1 in table2WithTriggers
+ C1,C2
+ -- --
+ {1,1}
+ {1,2}
+ {1,3}
+ {1,4}
+---Positive Test14a - make sure self referential delete cascade works when
deleteRow is issued
+ C1,C2
+ -- --
+ {e1,null}
+ {e2,e1}
+ {e3,e2}
+ {e4,e3}
+column 1 on this row is e1
+this delete row will cause the delete cascade constraint to delete all the
rows from the table and from the resultset
+expected exception Invalid cursor state - no current row.
+Verify that delete trigger got fired by verifying the row count to be 0 in
selfReferencingT1
+ 1
+ -
+ {0}
+---Positive Test14b - make sure self referential update restrict works when
updateRow is issued
+ C1,C2
+ -- --
+ {e1,null}
+ {e2,e1}
+ {e3,e2}
+ {e4,e3}
+column 1 on this row is e1
+update row should fail because cascade constraint is update restrict
+expected exception UPDATE on table 'SELFREFERENCINGT2' caused a violation of
foreign key constraint 'MANAGES2' for key (e1). The statement has been rolled
back.
+---Positive Test15 - With autocommit off, attempt to drop a table when there
is an open updatable resultset on it
+Opened an updatable resultset. Now trying to drop that table through another
Statement
+expected exception Operation 'DROP TABLE' cannot be performed on object 'T1'
because there is an open ResultSet dependent on that object.
+Since autocommit is off, the drop table exception will NOT result in a runtime
rollback and hence updatable resultset object is still open
+---Positive Test16a - Do deleteRow within a transaction and then rollback the
transaction
+Verify that before delete trigger got fired, row count is 0 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Verify that before deleteRow, row count is 4 in table0WithTriggers
+ 1
+ -
+ {4}
+column 1 on this row is 1
+now try to delete row and make sure that trigger got fired
+Verify that delete trigger got fired by verifying the row count to be 1 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+Verify that deleteRow in transaction, row count is 3 in table0WithTriggers
+ 1
+ -
+ {3}
+Verify that after rollback, row count is back to 0 in
deleteTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Verify that after rollback, row count is back to 4 in table0WithTriggers
+ 1
+ -
+ {4}
+---Positive Test16b - Do updateRow within a transaction and then rollback the
transaction
+Verify that before update trigger got fired, row count is 0 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Look at the data in table0WithTriggers before trigger gets fired
+ C1,C2
+ -- --
+ {1,1}
+ {2,2}
+ {3,3}
+ {4,4}
+column 1 on this row is 1
+now try to update row and make sure that trigger got fired
+Verify that update trigger got fired by verifying the row count to be 1 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {1}
+Verify that new data in table0WithTriggers
+ C1,C2
+ -- --
+ {123,1}
+ {2,2}
+ {3,3}
+ {4,4}
+Verify that after rollback, row count is back to 0 in
updateTriggerInsertIntoThisTable
+ 1
+ -
+ {0}
+Verify that after rollback, table0WithTriggers is back to its original contents
+ C1,C2
+ -- --
+ {1,1}
+ {2,2}
+ {3,3}
+ {4,4}
+---Positive Test17 - After deleteRow, resultset is positioned before the next
row
+getXXX right after deleteRow will fail because resultset is not positioned on
a row, instead it is right before the next row
+expected exception Invalid cursor state - no current row.
+---Positive Test18 - Test cancelRowUpdates method as the first updatable
ResultSet api on a read-only resultset
+expected exception 'cancelRowUpdates' not allowed because the ResultSet is not
an updatable ResultSet.
+---Positive Test19 - Test updateRow method as the first updatable ResultSet
api on a read-only resultset
+ Got expected exception : 'updateRow' not allowed because the ResultSet is
not an updatable ResultSet.
+---Positive Test20 - Test updateXXX methods as the first updatable ResultSet
api on a read-only resultset
+ Test updateShort on a readonly resultset
+ Using column position as first parameter to updateShort
+ Got expected exception : 'updateShort' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateShort
+ Got expected exception : 'updateShort' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateInt on a readonly resultset
+ Using column position as first parameter to updateInt
+ Got expected exception : 'updateInt' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateInt
+ Got expected exception : 'updateInt' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateLong on a readonly resultset
+ Using column position as first parameter to updateLong
+ Got expected exception : 'updateLong' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateLong
+ Got expected exception : 'updateLong' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateBigDecimal on a readonly resultset
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : 'updateBigDecimal' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : 'updateBigDecimal' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateFloat on a readonly resultset
+ Using column position as first parameter to updateFloat
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateFloat
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateDouble on a readonly resultset
+ Using column position as first parameter to updateDouble
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateDouble
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateString on a readonly resultset
+ Using column position as first parameter to updateString
+ Got expected exception : 'updateString' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateString
+ Got expected exception : 'updateString' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateAsciiStream on a readonly resultset
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : 'updateAsciiStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : 'updateAsciiStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateCharacterStream on a readonly resultset
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : 'updateCharacterStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : 'updateCharacterStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateByte on a readonly resultset
+ Using column position as first parameter to updateByte
+ Got expected exception : 'updateByte' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateByte
+ Got expected exception : 'updateByte' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateBytes on a readonly resultset
+ Using column position as first parameter to updateBytes
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateBytes
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateBinaryStream on a readonly resultset
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : 'updateBinaryStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : 'updateBinaryStream' not allowed because the
ResultSet is not an updatable ResultSet.
+ Test updateClob on a readonly resultset
+ Using column position as first parameter to updateClob
+ Got expected exception : 'updateClob' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateClob
+ Got expected exception : 'updateClob' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateDate on a readonly resultset
+ Using column position as first parameter to updateDate
+ Got expected exception : 'updateDate' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateDate
+ Got expected exception : 'updateDate' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateTime on a readonly resultset
+ Using column position as first parameter to updateTime
+ Got expected exception : 'updateTime' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateTime
+ Got expected exception : 'updateTime' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateTimestamp on a readonly resultset
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet
is not an updatable ResultSet.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet
is not an updatable ResultSet.
+ Test updateBlob on a readonly resultset
+ Using column position as first parameter to updateBlob
+ Got expected exception : 'updateBlob' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateBlob
+ Got expected exception : 'updateBlob' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateBoolean on a readonly resultset
+ Using column position as first parameter to updateBoolean
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet
is not an updatable ResultSet.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet
is not an updatable ResultSet.
+ Test updateNull on a readonly resultset
+ Using column position as first parameter to updateNull
+ Got expected exception : 'updateNull' not allowed because the ResultSet is
not an updatable ResultSet.
+ Using column name as first parameter to updateNull
+ Got expected exception : 'updateNull' not allowed because the ResultSet is
not an updatable ResultSet.
+ Test updateArray on a readonly resultset
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Test updateRef on a readonly resultset
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+---Positive Test21 - Test all updateXXX(excluding updateObject) methods on all
the supported sql datatypes
+Next datatype to test is SMALLINT
+ Testing updateShort on SQL type SMALLINT
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type SMALLINT
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type SMALLINT
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type SMALLINT
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type SMALLINT
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type SMALLINT
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type SMALLINT
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR'.
+ Testing updateAsciiStream on SQL type SMALLINT
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type SMALLINT
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type SMALLINT
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type SMALLINT
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type SMALLINT
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type SMALLINT
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type SMALLINT
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'DATE'.
+ Testing updateTime on SQL type SMALLINT
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIME'.
+ Testing updateTimestamp on SQL type SMALLINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values
of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type SMALLINT
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type SMALLINT
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type SMALLINT
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type SMALLINT
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type SMALLINT
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is INTEGER
+ Testing updateShort on SQL type INTEGER
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type INTEGER
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type INTEGER
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type INTEGER
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type INTEGER
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type INTEGER
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type INTEGER
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type INTEGER
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type INTEGER
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type INTEGER
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type INTEGER
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type INTEGER
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type INTEGER
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type INTEGER
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type INTEGER
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type INTEGER
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type INTEGER
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type INTEGER
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type INTEGER
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type INTEGER
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type INTEGER
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is BIGINT
+ Testing updateShort on SQL type BIGINT
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type BIGINT
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type BIGINT
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type BIGINT
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type BIGINT
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type BIGINT
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type BIGINT
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type BIGINT
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type BIGINT
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type BIGINT
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type BIGINT
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type BIGINT
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type BIGINT
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type BIGINT
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type BIGINT
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type BIGINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type BIGINT
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type BIGINT
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type BIGINT
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type BIGINT
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type BIGINT
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is DECIMAL(10,5)
+ Testing updateShort on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is REAL
+ Testing updateShort on SQL type REAL
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type REAL
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type REAL
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type REAL
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type REAL
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type REAL
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type REAL
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type REAL
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type REAL
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type REAL
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type REAL
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type REAL
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type REAL
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type REAL
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type REAL
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type REAL
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'REAL' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type REAL
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type REAL
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type REAL
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type REAL
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type REAL
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is DOUBLE
+ Testing updateShort on SQL type DOUBLE
+ Using column position as first parameter to updateShort
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type DOUBLE
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type DOUBLE
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type DOUBLE
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type DOUBLE
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type DOUBLE
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ Testing updateString on SQL type DOUBLE
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type DOUBLE
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type DOUBLE
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type DOUBLE
+ Using column position as first parameter to updateByte
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type DOUBLE
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type DOUBLE
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type DOUBLE
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type DOUBLE
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type DOUBLE
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type DOUBLE
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type DOUBLE
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type DOUBLE
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type DOUBLE
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type DOUBLE
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type DOUBLE
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is CHAR(60)
+ Testing updateShort on SQL type CHAR(60)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type CHAR(60)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type CHAR(60)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type CHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type CHAR(60)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type CHAR(60)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type CHAR(60)
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type CHAR(60)
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type CHAR(60)
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type CHAR(60)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type CHAR(60)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'CHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type CHAR(60)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type CHAR(60)
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type CHAR(60)
+ Using column position as first parameter to updateDate
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type CHAR(60)
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type CHAR(60)
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ Testing updateBlob on SQL type CHAR(60)
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type CHAR(60)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type CHAR(60)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type CHAR(60)
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type CHAR(60)
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is VARCHAR(60)
+ Testing updateShort on SQL type VARCHAR(60)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type VARCHAR(60)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type VARCHAR(60)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type VARCHAR(60)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type VARCHAR(60)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type VARCHAR(60)
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type VARCHAR(60)
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type VARCHAR(60)
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type VARCHAR(60)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type VARCHAR(60)
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type VARCHAR(60)
+ Using column position as first parameter to updateDate
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type VARCHAR(60)
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type VARCHAR(60)
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ Testing updateBlob on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type VARCHAR(60)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type VARCHAR(60)
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type VARCHAR(60)
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is LONG VARCHAR
+ Testing updateShort on SQL type LONG VARCHAR
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateInt on SQL type LONG VARCHAR
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateLong on SQL type LONG VARCHAR
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Testing updateFloat on SQL type LONG VARCHAR
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Testing updateDouble on SQL type LONG VARCHAR
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DECIMAL'.
+ Testing updateString on SQL type LONG VARCHAR
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type LONG VARCHAR
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type LONG VARCHAR
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type LONG VARCHAR
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'INTEGER'.
+ Testing updateBytes on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type LONG VARCHAR
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type LONG VARCHAR
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'DATE'.
+ Testing updateTime on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIME'.
+ Testing updateTimestamp on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold
values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type LONG VARCHAR
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type LONG VARCHAR
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type LONG VARCHAR
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is CHAR(2) FOR BIT DATA
+ Testing updateShort on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateInt on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateLong on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Testing updateFloat on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Testing updateDouble on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ Testing updateString on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ Testing updateAsciiStream on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ Testing updateBytes on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ Testing updateBinaryStream on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ Testing updateTime on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ Testing updateTimestamp on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is VARCHAR(2) FOR BIT DATA
+ Testing updateShort on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateInt on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateLong on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateFloat on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateDouble on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateString on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Testing updateAsciiStream on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBytes on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ Testing updateBinaryStream on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Testing updateTime on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Testing updateTimestamp on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is LONG VARCHAR FOR BIT DATA
+ Testing updateShort on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateInt on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateLong on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateFloat on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateDouble on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ Testing updateString on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ Testing updateAsciiStream on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ Testing updateBytes on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ Testing updateBinaryStream on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ Testing updateTime on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ Testing updateTimestamp on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ Testing updateBlob on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is CLOB(1k)
+ Testing updateShort on SQL type CLOB(1k)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type CLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type CLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type CLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type CLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type CLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type CLOB(1k)
+ Using column position as first parameter to updateString
+ Using column name as first parameter to updateString
+ Testing updateAsciiStream on SQL type CLOB(1k)
+ Using column position as first parameter to updateAsciiStream
+ Using column name as first parameter to updateAsciiStream
+ Testing updateCharacterStream on SQL type CLOB(1k)
+ Using column position as first parameter to updateCharacterStream
+ Using column name as first parameter to updateCharacterStream
+ Testing updateByte on SQL type CLOB(1k)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type CLOB(1k)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type CLOB(1k)
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type CLOB(1k)
+ Using column position as first parameter to updateClob
+ Using column name as first parameter to updateClob
+ Testing updateDate on SQL type CLOB(1k)
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type CLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type CLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'CLOB' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type CLOB(1k)
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type CLOB(1k)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type CLOB(1k)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type CLOB(1k)
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type CLOB(1k)
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is DATE
+ Testing updateShort on SQL type DATE
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type DATE
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type DATE
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type DATE
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type DATE
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type DATE
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type DATE
+ Using column position as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Using column name as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Testing updateAsciiStream on SQL type DATE
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type DATE
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type DATE
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type DATE
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type DATE
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type DATE
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type DATE
+ Using column position as first parameter to updateDate
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type DATE
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type DATE
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'DATE' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type DATE
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type DATE
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type DATE
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type DATE
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type DATE
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is TIME
+ Testing updateShort on SQL type TIME
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type TIME
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type TIME
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type TIME
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type TIME
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type TIME
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type TIME
+ Using column position as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Using column name as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Testing updateAsciiStream on SQL type TIME
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type TIME
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type TIME
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type TIME
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type TIME
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type TIME
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type TIME
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type TIME
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type TIME
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'TIME' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type TIME
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type TIME
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type TIME
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type TIME
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type TIME
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is TIMESTAMP
+ Testing updateShort on SQL type TIMESTAMP
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateInt on SQL type TIMESTAMP
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateLong on SQL type TIMESTAMP
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateBigDecimal on SQL type TIMESTAMP
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Testing updateFloat on SQL type TIMESTAMP
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Testing updateDouble on SQL type TIMESTAMP
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DECIMAL'.
+ Testing updateString on SQL type TIMESTAMP
+ Using column position as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Using column name as first parameter to updateString
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ Testing updateAsciiStream on SQL type TIMESTAMP
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type TIMESTAMP
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type TIMESTAMP
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'INTEGER'.
+ Testing updateBytes on SQL type TIMESTAMP
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type TIMESTAMP
+ Using column position as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateBinaryStream
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.io.InputStream'.
+ Testing updateClob on SQL type TIMESTAMP
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type TIMESTAMP
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'DATE'.
+ Testing updateTime on SQL type TIMESTAMP
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values
of type 'TIME'.
+ Testing updateTimestamp on SQL type TIMESTAMP
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ Testing updateBlob on SQL type TIMESTAMP
+ Using column position as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Blob'.
+ Using column name as first parameter to updateBlob
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Blob'.
+ Testing updateBoolean on SQL type TIMESTAMP
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type TIMESTAMP
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type TIMESTAMP
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type TIMESTAMP
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+Next datatype to test is BLOB(1k)
+ Testing updateShort on SQL type BLOB(1k)
+ Using column position as first parameter to updateShort
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateShort
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateInt on SQL type BLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateInt
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateLong on SQL type BLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateLong
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBigDecimal on SQL type BLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateFloat on SQL type BLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateDouble on SQL type BLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DECIMAL'.
+ Testing updateString on SQL type BLOB(1k)
+ Using column position as first parameter to updateString
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR'.
+ Using column name as first parameter to updateString
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR'.
+ Testing updateAsciiStream on SQL type BLOB(1k)
+ Using column position as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.InputStream'.
+ Using column name as first parameter to updateAsciiStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.InputStream'.
+ Testing updateCharacterStream on SQL type BLOB(1k)
+ Using column position as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.Reader'.
+ Using column name as first parameter to updateCharacterStream
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.io.Reader'.
+ Testing updateByte on SQL type BLOB(1k)
+ Using column position as first parameter to updateByte
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Using column name as first parameter to updateByte
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'INTEGER'.
+ Testing updateBytes on SQL type BLOB(1k)
+ Using column position as first parameter to updateBytes
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ Testing updateBinaryStream on SQL type BLOB(1k)
+ Using column position as first parameter to updateBinaryStream
+ Using column name as first parameter to updateBinaryStream
+ Testing updateClob on SQL type BLOB(1k)
+ Using column position as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.sql.Clob'.
+ Using column name as first parameter to updateClob
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.sql.Clob'.
+ Testing updateDate on SQL type BLOB(1k)
+ Using column position as first parameter to updateDate
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DATE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'DATE'.
+ Testing updateTime on SQL type BLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIME'.
+ Using column name as first parameter to updateTime
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIME'.
+ Testing updateTimestamp on SQL type BLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIMESTAMP'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : Columns of type 'BLOB' cannot hold values of
type 'TIMESTAMP'.
+ Testing updateBlob on SQL type BLOB(1k)
+ Using column position as first parameter to updateBlob
+ Using column name as first parameter to updateBlob
+ Testing updateBoolean on SQL type BLOB(1k)
+ Using column position as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : Syntax error: true.
+ Testing updateNull on SQL type BLOB(1k)
+ Using column position as first parameter to updateNull
+ Using column name as first parameter to updateNull
+ Testing updateArray on SQL type BLOB(1k)
+ Using column position as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateArray
+ Got expected exception : Feature not implemented: no details.
+ Testing updateRef on SQL type BLOB(1k)
+ Using column position as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+ Using column name as first parameter to updateRef
+ Got expected exception : Feature not implemented: no details.
+---Positive Test22 - Test updateObject method
+Next datatype to test is SMALLINT
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'SMALLINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'SMALLINT' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is INTEGER
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'INTEGER' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'INTEGER' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is BIGINT
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BIGINT' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'BIGINT' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is DECIMAL(10,5)
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DECIMAL' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DECIMAL' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is REAL
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'REAL' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'REAL' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is DOUBLE
+ updateObject with column position & Short object as parameters
+ updateObject with column name & Short object as parameters
+ updateObject with column position & Integer object as parameters
+ updateObject with column name & Integer object as parameters
+ updateObject with column position & Long object as parameters
+ updateObject with column name & Long object as parameters
+ updateObject with column position & BigDecimal object as parameters
+ updateObject with column name & BigDecimal object as parameters
+ updateObject with column position & Float object as parameters
+ updateObject with column name & Float object as parameters
+ updateObject with column position & Double object as parameters
+ updateObject with column name & Double object as parameters
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DOUBLE' cannot hold values of
type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DOUBLE' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is CHAR(60)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'CHAR' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ updateObject with column name & Date object as parameters
+ updateObject with column position & Time object as parameters
+ updateObject with column name & Time object as parameters
+ updateObject with column position & TimeStamp object as parameters
+ updateObject with column name & TimeStamp object as parameters
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is VARCHAR(60)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'VARCHAR' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ updateObject with column name & Date object as parameters
+ updateObject with column position & Time object as parameters
+ updateObject with column name & Time object as parameters
+ updateObject with column position & TimeStamp object as parameters
+ updateObject with column name & TimeStamp object as parameters
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is LONG VARCHAR
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR' cannot hold values
of type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is CHAR(2) FOR BIT DATA
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is VARCHAR(2) FOR BIT DATA
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'VARCHAR () FOR BIT DATA' cannot
hold values of type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'VARCHAR () FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is LONG VARCHAR FOR BIT DATA
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'LONG VARCHAR FOR BIT DATA'
cannot hold values of type 'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'LONG VARCHAR FOR BIT DATA' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is CLOB(1k)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ updateObject with column name & Clob object as parameters
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'CLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'CLOB' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is DATE
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column name & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ updateObject with column name & Date object as parameters
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'DATE' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'DATE' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is TIME
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column name & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ updateObject with column name & Time object as parameters
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'TIME' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIME' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is TIMESTAMP
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column name & String object as parameters
+ Got expected exception : The syntax of the string representation of a
datetime value is incorrect.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'TIMESTAMP' cannot hold values of
type 'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ updateObject with column name & TimeStamp object as parameters
+ updateObject with column position & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Blob'.
+ updateObject with column name & Blob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'TIMESTAMP' from a data value of type 'java.sql.Blob'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+Next datatype to test is BLOB(1k)
+ updateObject with column position & Short object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'INTEGER'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DECIMAL'.
+ updateObject with column position & String object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR'.
+ updateObject with column name & String object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR'.
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'CHAR () FOR BIT DATA'.
+ updateObject with column position & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.sql.Clob'.
+ updateObject with column name & Clob object as parameters
+ Got expected exception : An attempt was made to get a data value of type
'BLOB' from a data value of type 'java.sql.Clob'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DATE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'DATE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIME'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIME'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : Columns of type 'BLOB' cannot hold values of type
'TIMESTAMP'.
+ updateObject with column position & Blob object as parameters
+ updateObject with column name & Blob object as parameters
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : Syntax error: true.
+ updateObject with column position & null as parameters
+ updateObject with column name & null as parameters
+---Positive Test23 - Test cancelRowUpdates after updateXXX methods on all the
supported sql datatypes
+ updateShort and then cancelRowUpdates
+ updateInt and then cancelRowUpdates
+ updateLong and then cancelRowUpdates
+ updateBigDecimal and then cancelRowUpdates
+ updateFloat and then cancelRowUpdates
+ updateDouble and then cancelRowUpdates
+ updateString and then cancelRowUpdates
+ updateAsciiStream and then cancelRowUpdates
+ updateCharacterStream and then cancelRowUpdates
+ updateByte and then cancelRowUpdates
+ updateBytes and then cancelRowUpdates
+ updateBinaryStream and then cancelRowUpdates
+ updateDate and then cancelRowUpdates
+ updateTime and then cancelRowUpdates
+ updateTimestamp and then cancelRowUpdates
+ updateClob and then cancelRowUpdates
+ updateBlob and then cancelRowUpdates
+---Positive Test24a - after updateXXX, try cancelRowUpdates and then deleteRow
+column 1 on this row before updateInt is 1
+column 1 on this row after updateInt is 234
+now cancelRowUpdates on the row
+Since after cancelRowUpdates(), ResultSet is positioned on the same row,
getXXX will pass
+column 1 on this row after cancelRowUpdates is 1
+Since after cancelRowUpdates(), ResultSet is positioned on the same row, a
deleteRow at this point will pass
+PASS : deleteRow passed as expected
+calling updateRow after deleteRow w/o first positioning the ResultSet on the
next row will fail
+Got expected exception Invalid cursor state - no current row.
+Position the ResultSet with next()
+Should be able to updateRow() on the current row now
+---Positive Test25 - issue cancelRowUpdates without any updateXXX
+---Positive Test26 - issue updateRow without any updateXXX will not move the
resultset position
+---Positive Test27 - issue updateXXX and then deleteRow
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+Got expected exception Invalid cursor state - no current row.
+---Positive Test28 - issue updateXXXs and then move off the row, the changes
should be ignored
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+ column 1 on this row before updateInt is 1
+ Issue updateInt to change the column's value to 2345
+ Move to next row w/o issuing updateRow
+ Make sure that changes didn't make it to the database
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+---Positive Test29 - issue multiple updateXXXs and then a updateRow
+ C1,C2
+ -- --
+ {1,aa }
+ {2,bb }
+ {3,cc }
+ column 1 on this row before updateInt is 1
+ Issue updateInt to change the column's value to 2345
+ Issue another updateInt on the same row and column to change the column's
value to 9999
+ Issue updateString to change the column's value to 'xxxxxxx'
+ Now issue updateRow
+ Make sure that changes made it to the database correctly
+ C1,C2
+ -- --
+ {9999,xxxxxxx }
+ {2,bb }
+ {3,cc }
+---Positive Test30 - call updateXXX methods on only columns that correspond to
a column in the table
+ C1,C2
+ -- --
+ {9999,xxxxxxx }
+ {2,bb }
+ {3,cc }
+ Make sure that changes made it to the database correctly
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+Finished testing updateable resultsets
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
___________________________________________________________________
Name: svn:eol-style
+ native