On Mon, 14 Mar 2005 13:03:46 -0800, Mamta Satoor <[EMAIL PROTECTED]> wrote:
> On Mon, 14 Mar 2005 12:35:02 -0800, Satheesh Bandaram
> <[EMAIL PROTECTED]> wrote:
> > Oops... sorry. I didn't realize you were addressing those as a different
> > patch... I will get to it in a day or two.
> >
> > Army tried to apply the patch, but it failed... Not sure why.. Should we
> > try to merge your changes with latest and generate a new patch? You have
> > to merge in anycase...right?
> >
> > Satheesh
> >
> > Mamta Satoor wrote:
> >
> > >Hi Satheesh,
> > >
> > >I wondered if you got a chance to submit the patch I submitted couple
> > >weeks back. As per Dan's earlier post, the couple issues that are left
> > >on this feature can be sent as a separate patch. So, I will appreciate
> > >if you can submit the current patch for me.
> > >
> > >thanks,
> > >Mamta
> > >
> >
> >
>
> OK, I will work on merging and generating a new patch.
>
> Mamta
>
Here is the new patch after merging my changes with the latest source.
I have rerun all the tests and no new failures.
Thanks,
Mamta
Index: java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (revision
157479)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (working copy)
@@ -34,14 +34,20 @@
import org.apache.derby.iapi.sql.execute.ExecRow;
import org.apache.derby.iapi.sql.execute.NoPutResultSet;
+import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
+import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
+
import org.apache.derby.iapi.sql.Activation;
+import org.apache.derby.iapi.sql.execute.CursorActivation;
import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.types.VariableSizeDataValue;
import org.apache.derby.iapi.sql.ResultDescription;
import org.apache.derby.iapi.services.io.StreamStorable;
import org.apache.derby.iapi.services.io.LimitInputStream;
import org.apache.derby.iapi.services.io.NewByteArrayInputStream;
+import org.apache.derby.iapi.services.io.LimitReader;
import org.apache.derby.iapi.error.ExceptionSeverity;
import org.apache.derby.iapi.reference.JDBC20Translation;
import org.apache.derby.iapi.reference.SQLState;
@@ -91,9 +97,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.
- protected DataValueDescriptor[] rowData;
+ //deleteRow & updateRow make rowData null so that ResultSet is not
positioned on deleted/updated row.
+ private DataValueDescriptor[] rowData;
protected boolean wasNull;
protected boolean isClosed;
private Object currentStream;
@@ -115,7 +120,7 @@
// Order of creation
final int order;
-
+
private final ResultDescription resultDescription;
// max rows limit for this result set
@@ -142,15 +147,23 @@
protected final int concurrencyOfThisResultSet;
+ //copyOfDatabaseRow will keep the original contents of the columns of
the current row which got updated.
+ //These will be used if user decides to cancel the changes made to the
row using cancelRowUpdates.
+ private DataValueDescriptor[] copyOfDatabaseRow;
+ private boolean[] columnGotUpdated; //these are the columns which have
been updated so far. Used to build UPDATE...WHERE CURRENT OF sql
+ private boolean currentRowHasBeenUpdated; //Gets set to true after
first updateXXX on a row. Gets reset to false when the cursor moves off the row
+
private int fetchDirection;
private int fetchSize;
+ //td will be used to ensure the column selected for updateXXX is part of
the table.
+ private TableDescriptor td = null;
/**
* This class provides the glue between the Cloudscape
* resultset and the JDBC resultset, mapping calls-to-calls.
*/
public EmbedResultSet(EmbedConnection conn, ResultSet resultsToWrap,
- boolean forMetaData, EmbedStatement stmt, boolean isAtomic)
+ boolean forMetaData, EmbedStatement stmt, boolean isAtomic)
throws SQLException {
super(conn);
@@ -185,11 +198,15 @@
// Fill in the column types
resultDescription = theResults.getResultDescription();
+ //initialize arrays related to updateRow implementation
+ columnGotUpdated = new boolean[getMetaData().getColumnCount()];
+ copyOfDatabaseRow = new
DataValueDescriptor[columnGotUpdated.length];
+
// assign the max rows and maxfiled size limit for this result set
if (stmt != null)
{
// At connectivity level we handle only for forward only cursor
- if (stmt.resultSetType == JDBC20Translation.TYPE_FORWARD_ONLY)
+ if (stmt.resultSetType == JDBC20Translation.TYPE_FORWARD_ONLY)
maxRows = stmt.maxRows;
maxFieldSize = stmt.MaxFieldSize;
@@ -276,6 +293,11 @@
}
}
+ //since we are moving off of the current row, need to initialize
state corresponding to updateRow implementation
+ for (int i=0; i < columnGotUpdated.length; i++)
+ columnGotUpdated[i] = false;
+ currentRowHasBeenUpdated = false;
+
return movePosition(NEXT, 0, "next");
}
@@ -508,6 +530,10 @@
currentRow = null;
rowData = null;
rMetaData = null; // let it go, we can make a new one
+ //since we are moving off of the current row(by closing the
resultset), need to initialize state corresponding to updateRow implementation
+ for (int i=0; i < columnGotUpdated.length; i++)
+ columnGotUpdated[i] = false;
+ currentRowHasBeenUpdated = false;
// we hang on to theResults and messenger
// in case more calls come in on this resultSet
@@ -1975,7 +2001,7 @@
* @see EmbedDatabaseMetaData#updatesAreDetected
*/
public boolean rowUpdated() throws SQLException {
- throw Util.notImplemented();
+ return false;
}
/**
@@ -1996,22 +2022,110 @@
/**
* 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 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.
+ protected void checksBeforeUpdateOrDelete(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.
+ //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 == null) getTargetTableDescriptor();
+ if
(td.getColumnDescriptor(rd.getColumnDescriptor(columnIndex).getName()) == null)
+ throw Util.generateCsSQLException(SQLState.COLUMN_NOT_FROM_BASE_TABLE,
methodName);
+ }
+
+ //Get the table descriptor for the target table for updateXXX. td will
be used to ensure the column selected for updateXXX
+ //is part of the table.
+ private void getTargetTableDescriptor() throws SQLException {
+ 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();
+ }
+ }
+
+ //mark the column as updated and return DataValueDescriptor for it. It
will be used by updateXXX methods to put new values
+ protected DataValueDescriptor getDVDforColumnToBeUpdated(int
columnIndex, String updateMethodName) throws StandardException, SQLException {
+ checksBeforeUpdateOrDelete(updateMethodName, columnIndex);
+ if (columnGotUpdated[columnIndex-1] == false) {//this is the first
updateXXX call on this column
+ //this is the first updateXXX method call on this column. Save the
original content of the column into copyOfDatabaseRow
+ //The saved copy of the column will be needed if cancelRowUpdates is
issued
+ copyOfDatabaseRow[columnIndex - 1] =
currentRow.getColumn(columnIndex).getClone();
+ }
+ columnGotUpdated[columnIndex-1] = true;
+ currentRowHasBeenUpdated = true;
+ return currentRow.getColumn(columnIndex);
+ }
+
/**
* JDBC 2.0
*
@@ -2028,19 +2142,23 @@
* if a database-access error occurs
*/
public void updateNull(int columnIndex) throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateNull").setToNull();
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with a boolean value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2049,19 +2167,23 @@
* if a database-access error occurs
*/
public void updateBoolean(int columnIndex, boolean x) throws
SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateBoolean").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with a byte value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2070,19 +2192,23 @@
* if a database-access error occurs
*/
public void updateByte(int columnIndex, byte x) throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateByte").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with a short value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2091,19 +2217,23 @@
* if a database-access error occurs
*/
public void updateShort(int columnIndex, short x) throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateShort").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with an integer value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2112,19 +2242,23 @@
* if a database-access error occurs
*/
public void updateInt(int columnIndex, int x) throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateInt").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with a long value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2133,19 +2267,23 @@
* if a database-access error occurs
*/
public void updateLong(int columnIndex, long x) throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateLong").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with a float value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2154,14 +2292,18 @@
* if a database-access error occurs
*/
public void updateFloat(int columnIndex, float x) throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateFloat").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with a Double value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
@@ -2175,7 +2317,11 @@
* if a database-access error occurs
*/
public void updateDouble(int columnIndex, double x) throws SQLException
{
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateDouble").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
@@ -2196,7 +2342,11 @@
* if a database-access error occurs
*/
public void updateString(int columnIndex, String x) throws SQLException
{
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateString").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
@@ -2217,19 +2367,23 @@
* if a database-access error occurs
*/
public void updateBytes(int columnIndex, byte x[]) throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateBytes").setValue(x);
+ } 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 update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2239,19 +2393,23 @@
*/
public void updateDate(int columnIndex, java.sql.Date x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateDate").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with a Time value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2261,19 +2419,23 @@
*/
public void updateTime(int columnIndex, java.sql.Time x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateTime").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* 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 update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2283,19 +2445,23 @@
*/
public void updateTimestamp(int columnIndex, java.sql.Timestamp x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateTimestamp").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with an ascii stream value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2307,19 +2473,41 @@
*/
public void updateAsciiStream(int columnIndex, java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ checksBeforeUpdateOrDelete("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.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2331,9 +2519,40 @@
*/
public void updateBinaryStream(int columnIndex, java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ checksBeforeUpdateOrDelete("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 {
+ getDVDforColumnToBeUpdated(columnIndex,
updateMethodName).setValue(new RawToBinaryFormatStream(x, length), length);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
+ }
+
/**
* JDBC 2.0
*
@@ -2355,19 +2574,56 @@
*/
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 getDVDforColumnToBeUpdated 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 checksBeforeUpdateOrDelete here.
+ checksBeforeUpdateOrDelete("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);
+ getDVDforColumnToBeUpdated(columnIndex,
updateMethodName).setValue(utfIn, length);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
+ }
+
/**
* JDBC 2.0
- *
+ *
* Update a column with an Object value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2381,19 +2637,41 @@
*/
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 them to the passed scale.
+ */
+ int colType = getColumnType(columnIndex);
+ if ((colType == Types.DECIMAL) || (colType == Types.NUMERIC)) {
+ if (scale < 0)
+ throw newSQLException(SQLState.BAD_SCALE_VALUE,
new Integer(scale));
+
+ try {
+ DataValueDescriptor value =
currentRow.getColumn(columnIndex);
+
+ int origvaluelen = value.getLength();
+ ((VariableSizeDataValue)
+
value).setWidth(VariableSizeDataValue.IGNORE_PRECISION,
+ scale,
+ false);
+
+ } catch (StandardException t) {
+ throw EmbedResultSet.noStateChangeException(t);
+ }
+ }
}
/**
* JDBC 2.0
- *
+ *
* Update a column with an Object value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnIndex
* the first column is 1, the second is 2, ...
* @param x
@@ -2402,7 +2680,88 @@
* if a database-access error occurs
*/
public void updateObject(int columnIndex, Object x) throws SQLException
{
- throw Util.notImplemented();
+ checksBeforeUpdateOrDelete("updateObject", columnIndex);
+ int colType = getColumnType(columnIndex);
+ if (colType ==
org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT) {
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateObject").setValue(x);
+ return;
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
+ }
+ }
+
+ if (x == null) {
+ updateNull(columnIndex);
+ return;
+ }
+
+ if (x instanceof String) {
+ updateString(columnIndex, (String) x);
+ return;
+ }
+
+ if (x instanceof Boolean) {
+ updateBoolean(columnIndex, ((Boolean)
x).booleanValue());
+ return;
+ }
+
+ if (x instanceof Short) {
+ updateShort(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());
}
/**
@@ -2421,7 +2780,7 @@
* if a database-access error occurs
*/
public void updateNull(String columnName) throws SQLException {
- throw Util.notImplemented();
+ updateNull(findColumnName(columnName));
}
/**
@@ -2442,7 +2801,7 @@
* if a database-access error occurs
*/
public void updateBoolean(String columnName, boolean x) throws
SQLException {
- throw Util.notImplemented();
+ updateBoolean(findColumnName(columnName), x);
}
/**
@@ -2463,7 +2822,7 @@
* if a database-access error occurs
*/
public void updateByte(String columnName, byte x) throws SQLException {
- throw Util.notImplemented();
+ updateByte(findColumnName(columnName), x);
}
/**
@@ -2484,7 +2843,7 @@
* if a database-access error occurs
*/
public void updateShort(String columnName, short x) throws SQLException
{
- throw Util.notImplemented();
+ updateShort(findColumnName(columnName), x);
}
/**
@@ -2505,7 +2864,7 @@
* if a database-access error occurs
*/
public void updateInt(String columnName, int x) throws SQLException {
- throw Util.notImplemented();
+ updateInt(findColumnName(columnName), x);
}
/**
@@ -2526,7 +2885,7 @@
* if a database-access error occurs
*/
public void updateLong(String columnName, long x) throws SQLException {
- throw Util.notImplemented();
+ updateLong(findColumnName(columnName), x);
}
/**
@@ -2547,7 +2906,7 @@
* if a database-access error occurs
*/
public void updateFloat(String columnName, float x) throws SQLException
{
- throw Util.notImplemented();
+ updateFloat(findColumnName(columnName), x);
}
/**
@@ -2568,7 +2927,7 @@
* if a database-access error occurs
*/
public void updateDouble(String columnName, double x) throws
SQLException {
- throw Util.notImplemented();
+ updateDouble(findColumnName(columnName), x);
}
/**
@@ -2589,7 +2948,7 @@
* if a database-access error occurs
*/
public void updateString(String columnName, String x) throws
SQLException {
- throw Util.notImplemented();
+ updateString(findColumnName(columnName), x);
}
/**
@@ -2610,7 +2969,7 @@
* if a database-access error occurs
*/
public void updateBytes(String columnName, byte x[]) throws
SQLException {
- throw Util.notImplemented();
+ updateBytes(findColumnName(columnName), x);
}
/**
@@ -2632,7 +2991,7 @@
*/
public void updateDate(String columnName, java.sql.Date x)
throws SQLException {
- throw Util.notImplemented();
+ updateDate(findColumnName(columnName), x);
}
/**
@@ -2654,7 +3013,7 @@
*/
public void updateTime(String columnName, java.sql.Time x)
throws SQLException {
- throw Util.notImplemented();
+ updateTime(findColumnName(columnName), x);
}
/**
@@ -2676,7 +3035,7 @@
*/
public void updateTimestamp(String columnName, java.sql.Timestamp x)
throws SQLException {
- throw Util.notImplemented();
+ updateTimestamp(findColumnName(columnName), x);
}
/**
@@ -2700,7 +3059,7 @@
*/
public void updateAsciiStream(String columnName, java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ updateAsciiStream(findColumnName(columnName), x, length);
}
/**
@@ -2724,7 +3083,7 @@
*/
public void updateBinaryStream(String columnName, java.io.InputStream x,
int length) throws SQLException {
- throw Util.notImplemented();
+ updateBinaryStream(findColumnName(columnName), x, length);
}
/**
@@ -2748,45 +3107,41 @@
*/
public void updateCharacterStream(String columnName, java.io.Reader
reader,
int length) throws SQLException {
- throw Util.notImplemented();
+ updateCharacterStream(findColumnName(columnName), reader,
length);
}
/**
* JDBC 2.0
- *
+ *
* Update a column with an Object value.
- *
- * The updateXXX() methods are used to update column values in the
current
- * row, or the insert row. The updateXXX() methods do not update the
- * underlying database, instead the updateRow() or insertRow() methods
are
- * called to update the database.
- *
- * @param columnName
- * the name of the column
- * @param x
- * the new column value
- * @param scale
- * For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
- * this is the number of digits after the decimal. For all
other
- * types this value will be ignored.
- * @exception SQLException
- * if a database-access error occurs
+ *
+ * The updateXXX() methods are used to update column values in the
+ * current row, or the insert row. The updateXXX() methods do not
+ * update the underlying database, instead the updateRow() or
insertRow()
+ * methods are called to update the database.
+ *
+ * @param columnName the name of the column
+ * @param x the new column value
+ * @param scale For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC
types
+ * this is the number of digits after the decimal. For all other
+ * types this value will be ignored.
+ * @exception SQLException if a database-access error occurs
*/
public void updateObject(String columnName, Object x, int scale)
- throws SQLException {
- throw Util.notImplemented();
+ throws SQLException {
+ updateObject(findColumnName(columnName), x, scale);
}
/**
* JDBC 2.0
- *
+ *
* Update a column with an Object value.
- *
+ *
* The updateXXX() methods are used to update column values in the
current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods
are
* called to update the database.
- *
+ *
* @param columnName
* the name of the column
* @param x
@@ -2795,7 +3150,7 @@
* if a database-access error occurs
*/
public void updateObject(String columnName, Object x) throws
SQLException {
- throw Util.notImplemented();
+ updateObject(findColumnName(columnName), x);
}
/**
@@ -2813,102 +3168,119 @@
throw Util.notImplemented();
}
- /**
- * JDBC 2.0
- *
- * Update the underlying database with the new contents of the current
row.
- * Cannot be called when on the insert row.
- *
- * @exception SQLException
- * if a database-access error occurs, or if called when
on
- * the insert row
- */
- public void updateRow() throws SQLException {
- throw Util.notImplemented();
- }
+ /**
+ * JDBC 2.0
+ *
+ * Update the underlying database with the new contents of the
+ * current row. Cannot be called when on the insert row.
+ *
+ * @exception SQLException if a database-access error occurs, or
+ * if called when on the insert row
+ */
+ public void updateRow() throws SQLException {
+ synchronized (getConnectionSynchronization()) {
+ checksBeforeUpdateOrDelete("updateRow", -1);
+ setupContextStack();
+ LanguageConnectionContext lcc = null;
+ StatementContext statementContext = null;
+ try {
+ if (currentRowHasBeenUpdated == false) //nothing got updated on
this row
+ return; //nothing to do since no updates were made to this row
- /**
- * JDBC 2.0
- *
- * Delete the current row from the result set and the underlying
database.
- * Cannot be called when on the insert row.
- *
- * @exception SQLException
- * if a database-access error occurs, or if called when
on
- * the insert row.
- */
- public void deleteRow() throws SQLException {
- synchronized (getConnectionSynchronization()) {
- checkIfClosed("deleteRow");
- checkOnRow(); // first make sure there's a current 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();
- if (getConcurrency() !=
JDBC20Translation.CONCUR_UPDATABLE)//if not
-
// updatable
-
// resultset,
-
// can't
-
// issue
-
// deleteRow
- throw Util.generateCsSQLException(
-
SQLState.UPDATABLE_RESULTSET_API_DISALLOWED,
- "deleteRow");
+ for (int i=1; i<=rd.getColumnCount(); i++) { //in this for loop we
are constructing columnname=?,... part of the update sql
+ if (columnGotUpdated[i-1]) { //if the column got updated, do
following
+ if (foundOneColumnAlready)
+ updateWhereCurrentOfSQL.append(",");
+ //using quotes around the column name to preserve case
sensitivity
+ updateWhereCurrentOfSQL.append("\"" +
rd.getColumnDescriptor(i).getName() + "\"=?");
+ 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());
+ Activation act = ps.getActivation(lcc, false);
- setupContextStack();
- 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());
-
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() + "\"");
-
- 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);
- rs.close();
- rs.finish();
- //For forward only resultsets, after a delete,
the ResultSet
- // will be positioned right before the next row.
- rowData = null;
- lcc.popStatementContext(statementContext, null);
- } catch (StandardException t) {
- throw closeOnTransactionError(t);
- } finally {
- restoreContextStack();
+ //in this for loop we are assigning values for parameters in sql
constructed earlier with columnname=?,...
+ for (int i=1, paramPosition=0; i<=rd.getColumnCount(); i++) {
+ if (columnGotUpdated[i-1]) //if the column got updated, do
following
+
act.getParameterValueSet().getParameterForSet(paramPosition++).setValue(currentRow.getColumn(i));
+ }
+ org.apache.derby.iapi.sql.ResultSet rs = ps.execute(act, false,
true, 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;
+ lcc.popStatementContext(statementContext, null);
+ } catch (StandardException t) {
+ throw closeOnTransactionError(t);
+ } finally {
+ if (statementContext != null)
+ lcc.popStatementContext(statementContext, null);
+ restoreContextStack();
+ }
}
- }
- }
+ }
+ /**
+ * JDBC 2.0
+ *
+ * Delete the current row from the result set and the underlying
+ * database. Cannot be called when on the insert row.
+ *
+ * @exception SQLException if a database-access error occurs, or if
+ * called when on the insert row.
+ */
+ public void deleteRow() throws SQLException {
+ synchronized (getConnectionSynchronization()) {
+ checksBeforeUpdateOrDelete("deleteRow", -1);
+
+ setupContextStack();
+ //now construct the delete where current of sql
+ try {
+ StringBuffer deleteWhereCurrentOfSQL = new
StringBuffer("DELETE FROM ");
+ 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() + "\"");
+
+ 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); //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;
+ lcc.popStatementContext(statementContext, null);
+ } catch (StandardException t) {
+ throw closeOnTransactionError(t);
+ } finally {
+ restoreContextStack();
+ }
+ }
+ }
+
private String getFullBaseTableName(ExecCursorTableReference
targetTable) {
+ //using quotes to preserve case sensitivity
if (targetTable.getSchemaName() != null)
- return targetTable.getSchemaName() + "."
- + targetTable.getBaseName();
+ return "\"" + targetTable.getSchemaName() + "\".\""
+ + targetTable.getBaseName() + "\"";
else
- return targetTable.getBaseName();
+ return "\"" + targetTable.getBaseName() + "\"";
}
/**
@@ -2937,23 +3309,32 @@
throw Util.notImplemented();
}
- /**
- * JDBC 2.0
- *
- * The cancelRowUpdates() method may be called after calling an
updateXXX()
- * method(s) and before calling updateRow() to rollback the updates
made to
- * a row. If no updates have been made or updateRow() has already been
- * called, then this method has no effect.
- *
- * @exception SQLException
- * if a database-access error occurs, or if called when
on
- * the insert row.
- *
- */
- public void cancelRowUpdates() throws SQLException {
- throw Util.notImplemented();
- }
+ /**
+ * JDBC 2.0
+ *
+ * The cancelRowUpdates() method may be called after calling an
+ * updateXXX() method(s) and before calling updateRow() to rollback
+ * the updates made to a row. If no updates have been made or
+ * updateRow() has already been called, then this method has no
+ * effect.
+ *
+ * @exception SQLException if a database-access error occurs, or if
+ * called when on the insert row.
+ *
+ */
+ public void cancelRowUpdates () throws SQLException {
+ checksBeforeUpdateOrDelete("cancelRowUpdates", -1);
+ if (currentRowHasBeenUpdated == false) return; //nothing got updated
on this row so cancelRowUpdates is a no-op in this case.
+ for (int i=0; i < columnGotUpdated.length; i++){
+ if (columnGotUpdated[i] == true) currentRow.setColumn(i+1,
copyOfDatabaseRow[i]);//if column got updated, resotre the original data
+ columnGotUpdated[i] = false;
+ }
+ currentRowHasBeenUpdated = false;
+ //rowData needs to be refreshed with the currentRow otherwise it will
continue to have changes made by updateXXX methods
+ rowData = currentRow.getRowArray();
+ }
+
/**
* JDBC 2.0
*
@@ -3141,7 +3522,15 @@
* Feature not implemented for now.
*/
public void updateBlob(int columnIndex, Blob x) throws SQLException {
- throw Util.notImplemented();
+ checksBeforeUpdateOrDelete("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");
}
/**
@@ -3160,7 +3549,7 @@
* Feature not implemented for now.
*/
public void updateBlob(String columnName, Blob x) throws SQLException {
- throw Util.notImplemented();
+ updateBlob(findColumnName(columnName), x);
}
/**
@@ -3179,7 +3568,15 @@
* Feature not implemented for now.
*/
public void updateClob(int columnIndex, Clob x) throws SQLException {
- throw Util.notImplemented();
+ checksBeforeUpdateOrDelete("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");
}
/**
@@ -3198,7 +3595,7 @@
* Feature not implemented for now.
*/
public void updateClob(String columnName, Clob x) throws SQLException {
- throw Util.notImplemented();
+ updateClob(findColumnName(columnName), x);
}
@@ -3505,5 +3902,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 157479)
+++ 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;
@@ -2618,7 +2604,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;
@@ -2658,7 +2644,7 @@
*/
//Since Derby materializes a forward only ResultSet incrementally, it is
possible to see changes
//made by others and hence following 3 metadata calls will return true for
forward only ResultSets.
- //Scroll insensitive ResultSet by their definition do not see chnages made
by others.
+ //Scroll insensitive ResultSet by their definition do not see changes made
by others.
//Derby does not yet implement scroll sensitive resultsets.
public boolean othersUpdatesAreVisible(int type) {
if (type == JDBC20Translation.TYPE_FORWARD_ONLY)
@@ -2687,6 +2673,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;
}
@@ -2694,13 +2682,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 157479)
+++ 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,7 +31,7 @@
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 java.sql.Statement;
@@ -71,7 +70,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,
@@ -165,32 +164,49 @@
return getBigDecimal(findColumnName(columnName));
}
-
-
-
- /**
- * 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
- * update the underlying database, instead the updateRow() or insertRow()
- * methods are called to update the database.
- *
- * @param columnIndex the first column is 1, the second is 2, ...
- * @param x the new column value
- * @exception SQLException if a database-access error occurs
- */
public void updateBigDecimal(int columnIndex, BigDecimal x)
throws SQLException {
- throw Util.notImplemented();
+ try {
+ getDVDforColumnToBeUpdated(columnIndex,
"updateBigDecimal").setValue(x);
+ } catch (StandardException t) {
+ throw noStateChangeException(t);
}
+ }
+ /**
+ * JDBC 2.0
+ *
+ * Update a column with an Object value.
+ *
+ * The updateXXX() methods are used to update column values in the
current
+ * row, or the insert row. The updateXXX() methods do not update the
+ * underlying database, instead the updateRow() or insertRow() methods
are
+ * called to update the database.
+ *
+ * @param columnIndex
+ * the first column is 1, the second is 2, ...
+ * @param x
+ * the new column value
+ * @exception SQLException
+ * if a database-access error occurs
+ */
+ public void updateObject(int columnIndex, Object x) throws SQLException
{
+ //If the Object x is the right datatype, this method will
eventually call getDVDforColumnToBeUpdated 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 checksBeforeUpdateOrDelete here.
+ checksBeforeUpdateOrDelete("updateObject", columnIndex);
+ int colType = getColumnType(columnIndex);
+ if (x instanceof BigDecimal) {
+ updateBigDecimal(columnIndex, (BigDecimal) x);
+ return;
+ }
+ super.updateObject(columnIndex, x);
+ }
+
/**
* JDBC 2.0
- *
+ *
* Update a column with a BigDecimal value.
*
* The updateXXX() methods are used to update column values in the
@@ -204,15 +220,13 @@
*/
public void updateBigDecimal(String columnName, BigDecimal x)
throws SQLException {
- throw Util.notImplemented();
+ updateBigDecimal(findColumnName(columnName), x);
}
-
-
/**
* JDBC 2.0
*
- * Returns the value of column @i as a Java object. Use the
+ * Returns the value of column @i as a Java object. Use the
* param map to determine the class from which to construct data of
* SQL structured and distinct types.
*
@@ -356,7 +370,6 @@
throw Util.notImplemented();
}
-
/**
* JDBC 3.0
*
Index: java/engine/org/apache/derby/iapi/types/SQLClob.java
===================================================================
--- java/engine/org/apache/derby/iapi/types/SQLClob.java (revision
157479)
+++ java/engine/org/apache/derby/iapi/types/SQLClob.java (working copy)
@@ -242,7 +242,6 @@
public void setValue(byte theValue) throws StandardException
{
- new Throwable("FRED").printStackTrace(System.out);
throwLangSetMismatch("byte");
}
Index: java/engine/org/apache/derby/iapi/reference/SQLState.java
===================================================================
--- java/engine/org/apache/derby/iapi/reference/SQLState.java (revision
157479)
+++ 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
157479)
+++ 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 157479)
+++ 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 157479)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java
(working copy)
@@ -33,21 +33,169 @@
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 api
+ 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;
+ 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",
"PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 1 INTEGER */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 2 BIGINT */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 3 DECIMAL */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 4 REAL */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 5 DOUBLE */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 6 CHAR */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "PASS", "PASS", "PASS", "PASS", "ERROR", "ERROR", "PASS", "PASS",
"PASS", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 7 VARCHAR */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "PASS", "PASS", "PASS", "PASS", "ERROR", "ERROR", "PASS", "PASS",
"PASS", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 8 LONGVARCHAR */ { "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "PASS", "PASS", "PASS", "PASS", "ERROR", "ERROR", "PASS", "PASS",
"PASS", "ERROR", "PASS", "PASS", "ERROR", "ERROR" },
+/* 9 CHAR FOR BIT */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 10 VARCH. BIT */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 11 LONGVAR. BIT */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "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", "PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 14 TIME */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"PASS", "PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 15 TIMESTAMP */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "PASS", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "PASS",
"PASS", "PASS", "ERROR", "ERROR", "PASS", "ERROR", "ERROR" },
+/* 16 BLOB */ { "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
"ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "PASS", "PASS", "ERROR", "ERROR",
"ERROR", "ERROR", "PASS", "ERROR", "PASS", "ERROR", "ERROR" },
+
+ };
+
public static void main(String[] args) {
- System.out.println("Start testing delete using JDBC2.0
updateable resultset apis");
+ 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
@@ -67,15 +215,15 @@
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("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");
+ 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("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();
@@ -87,6 +235,16 @@
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();
@@ -100,9 +258,9 @@
}
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");
+ 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 {
@@ -115,19 +273,9 @@
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");
- 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");
+ 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"))
@@ -135,15 +283,16 @@
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 Test4 - request a read
only resultset and send a sql with FOR UPDATE clause and attempt deleteRow on
it");
+ 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 FOR UPDATE");
+ 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 with FOR UPDATE clause in the SELECT sql.");
+ 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");
@@ -154,25 +303,10 @@
else
dumpSQLExceptions(e);
}
- //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
- System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
- warnings = rs.getWarnings();
- while (warnings != null)
- {
- System.out.println("Expected warnings on
resultset = " + warnings);
- warnings = warnings.getNextWarning();
- }
- rs.clearWarnings();
- rs.next();
- System.out.println("Now attempting to send a delete on a sql with no FOR
UPDATE clause.");
+ System.out.println("Now attempting to send an updateRow on a read only
resultset.");
try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed on sql with no FOR UPDATE clause");
+ 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"))
@@ -183,19 +317,86 @@
//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 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.");
+ 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 a updateRow
on a read only resultset with FOR UPDATE clause in the SELECT sql.");
+ 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 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
+ System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
+ warnings = rs.getWarnings();
+ while (warnings != null)
+ {
+ System.out.println("Expected warnings on
resultset = " + warnings);
+ warnings = warnings.getNextWarning();
+ }
+ rs.clearWarnings();
+ rs.next();
+ System.out.println("Now attempting to send a delete on a sql with no FOR
UPDATE clause.");
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! deleteRow 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);
+ }
+ 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() != null &&
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("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
- warnings = rs.getWarnings();
- while (warnings != null)
- {
- System.out.println("Expected warnings on
resultset = " + warnings);
- warnings = warnings.getNextWarning();
- }
- rs.clearWarnings();
- rs.next();
- System.out.println("Now attempting to send a delete on a sql with FOR
READ ONLY clause.");
+ System.out.println("Make sure that we got
CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
+ warnings = rs.getWarnings();
+ while (warnings != null)
+ {
+ System.out.println("Expected warnings on
resultset = " + warnings);
+ warnings = warnings.getNextWarning();
+ }
+ 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");
@@ -206,14 +407,25 @@
else
dumpSQLExceptions(e);
}
- //have to close the resultset because by default,
resultsets are held open over commit
+ 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");
+ 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.");
+ 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");
@@ -224,7 +436,18 @@
else
dumpSQLExceptions(e);
}
- while (rs.next());//read all the rows from the
resultset and position after the last row
+ 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!");
try {
rs.deleteRow();
@@ -236,9 +459,20 @@
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 on updatable resultset after closing the resultset");
+ 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));
@@ -254,6 +488,16 @@
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 {
@@ -266,7 +510,7 @@
else
dumpSQLExceptions(e);
}
-
+
System.out.println("---Negative Test10 - try updatable
resultset on a view");
try {
rs = stmt.executeQuery("SELECT * FROM v1 FOR
UPDATE");
@@ -298,35 +542,74 @@
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();
+ 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")) {
+ 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.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("XCL16"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+
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"))
+ System.out.println("expected exception
" + e.getMessage());
+ 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();
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("XCL16"))
+ 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");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XCL16"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
- System.out.println("---Negative Test13 - foreign key
constraint failure will cause deleteRow to fail");
+ 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 1, 2 FROM tableWithPrimaryKey FOR
UPDATE");
+ rs = stmt.executeQuery("SELECT c1, c2 FROM
tableWithPrimaryKey FOR UPDATE");
rs.next();
+ rs.updateInt(1,11);
+ rs.updateInt(2,22);
try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should
have failed because it will cause foreign key constraint failure");
+ 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"))
@@ -335,23 +618,54 @@
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");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("XCL16"))
+ System.out.println("expected exception
" + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+
+ 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.next();
- System.out.println("FAIL!!! next should have
failed because foreign key constraint failure resulted in a runtime rollback");
+ 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("XCL16"))
+ if (e.getSQLState().equals("XJ084"))
System.out.println("expected exception
" + e.getMessage());
else
dumpSQLExceptions(e);
}
- System.out.println("---Positive Test1 - request
updatable resultset for forward only type resultset");
+ 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("warnings = " + warnings);
+ System.out.println("Unexpected warnings = " +
warnings);
warnings = warnings.getNextWarning();
}
System.out.println("requested TYPE_FORWARD_ONLY, CONCUR_UPDATABLE");
@@ -364,8 +678,19 @@
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));
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
try {
- System.out.println("column 1 on this deleted
row is " + rs.getInt(1));
+ 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"))
@@ -373,10 +698,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("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 {
+ System.out.println("column 1 on this updateRow
row is " + rs.getInt(1));
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("calling updateRow 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");
+ 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"))
@@ -384,17 +743,18 @@
else
dumpSQLExceptions(e);
}
- System.out.println("Position the ResultSet with next()");
+ 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();
+ 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"));
+ 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));
@@ -402,9 +762,9 @@
//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"));
+ dumpRS(stmt.executeQuery("select count(*) from t1"));
- System.out.println("---Positive Test3 - use prepared
statement with concur updatable status");
+ 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");
@@ -416,8 +776,19 @@
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));
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
try {
- System.out.println("column 1 on this deleted
row is " + rs.getInt(1));
+ 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"))
@@ -425,10 +796,40 @@
else
dumpSQLExceptions(e);
}
- System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
+ 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 {
+ System.out.println("column 1 on this updated
row is " + rs.getInt(1));
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("calling updateRow/updateXXX 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");
+ 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"))
@@ -436,10 +837,30 @@
else
dumpSQLExceptions(e);
}
- System.out.println("Position the ResultSet with next()");
+ 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 deletRow() on the current row
now");
- rs.deleteRow();
+ 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();
@@ -454,17 +875,17 @@
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));
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
+ dumpSQLExceptions(e);
+ }
+ System.out.println("calling deleteRow again w/o first positioning the
ResultSet on the next row will fail");
try {
- System.out.println("column 1 on this deleted
row is " + rs.getInt(1));
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("24000"))
- System.out.println("Got expected
exception " + e.getMessage());
- else
- 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");
}
@@ -477,7 +898,7 @@
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();
+ rs.deleteRow();
//have to close the resultset because by default,
resultsets are held open over commit
rs.close();
@@ -489,27 +910,48 @@
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 Test6 - 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");
+ 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();
- stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
- rs.next();
- System.out.println("The JDBC program should look at rowDeleted only if
deletesAreDetected returns true");
- System.out.println("Since Derby returns false for detlesAreDetected for
FORWARD_ONLY updatable resultset,the program should not rely on rs.rowDeleted()
for FORWARD_ONLY updatable resultsets");
- System.out.println("Have this call to rs.rowDeleted() just to make sure
the method does always return false? " + rs.rowDeleted());
- 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();
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE of c1");
+ rs.next();
+ System.out.println("The JDBC program should look at rowDeleted only if
deletesAreDetected returns true");
+ System.out.println("Since Derby returns false for detlesAreDetected for
FORWARD_ONLY updatable resultset,the program should not rely on rs.rowDeleted()
for FORWARD_ONLY updatable resultsets");
+ System.out.println("Have this call to rs.rowDeleted() just to make sure
the method does always return false? " + rs.rowDeleted());
+ 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);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE of
c1");
+ rs.next();
+ 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();
+
+ 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)");
@@ -526,7 +968,26 @@
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");
+ 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");
@@ -540,15 +1001,51 @@
rs.deleteRow();
rs.close();
- System.out.println("---Positive Test9 - using
correlation name for the table in the select sql is not a problem");
+ 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);
@@ -557,14 +1054,14 @@
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 = 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());
+ System.out.println("FAIL!!! delete using second
resultset succedded? ");
}
catch (SQLException e) {
if (e.getSQLState().equals("XCL08"))
@@ -573,8 +1070,8 @@
dumpSQLExceptions(e);
}
System.out.println("Move to next row in the 2nd
resultset and then delete using the second resultset");
- rs1.next();
- rs1.deleteRow();
+ rs1.next();
+ rs1.deleteRow();
rs.close();
rs1.close();
conn.setAutoCommit(true);
@@ -591,12 +1088,12 @@
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");
+ 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
tableWithDeleteTriggers FOR UPDATE");
+ 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");
@@ -607,122 +1104,1089 @@
//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 Test12b - make sure
update trigger gets fired when updateRow is issued");
+ reloadData();
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT * FROM
anotherTableWithDeleteTriggers FOR UPDATE");
+ 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("this delete row will fire the
delete trigger which will delete all the rows from the table and from the
resultset");
- rs.deleteRow();
- 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");
- }
- catch (SQLException e) {
- if (e.getSQLState().equals("24000")) {
- System.out.println("expected exception
" + e.getMessage());
- } else
- dumpSQLExceptions(e);
- }
+ 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 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 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 Test14 - make sure self
referential delete cascade works when deleteRow is issued");
+ System.out.println("---Positive Test13a - Another test
case for delete trigger");
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ 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();
+ 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");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000")) {
+ System.out.println("expected exception
" + e.getMessage());
+ } else
+ dumpSQLExceptions(e);
+ }
+ rs.close();
+ 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 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
table2WithTriggers where c1>1 FOR UPDATE");
+ rs.next();
+ System.out.println("column 1 on this row is " +
rs.getInt(1));
+ 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.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")) {
+ System.out.println("expected exception
" + e.getMessage());
+ } else
+ dumpSQLExceptions(e);
+ }
+ rs.close();
+ 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 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();
+ System.out.println("column 1 on this row is " +
rs.getString(1));
+ System.out.println("this delete row will cause the
delete cascade constraint to delete all the rows from the table and from the
resultset");
+ rs.deleteRow();
+ rs.next();
+ try {
+ rs.deleteRow();
+ System.out.println("FAIL!!! there should have
be no more rows in the resultset at this point because delete cascade deleted
all the rows");
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000")) {
+ System.out.println("expected exception
" + e.getMessage());
+ } else
+ dumpSQLExceptions(e);
+ }
+ rs.close();
+ 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);
+ 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 off, the drop
table exception will NOT result in a runtime rollback and hence updatable
resultset object is still open");
+ rs.deleteRow();
+ rs.close();
+ conn.setAutoCommit(true);
+
+ 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 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");
+ 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 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 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);
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs.next();
+ rs.deleteRow();
+ System.out.println("getXXX right after deleteRow will fail because
resultset is not positioned on a row, instead it is right before the next row");
+ try {
+ System.out.println("column 1 (which is not
nullable) after deleteRow is " + rs.getString(1));
+ }
+ catch (SQLException e) {
+ if (e.getSQLState().equals("24000")) {
+ System.out.println("expected exception
" + e.getMessage());
+ } else
+ dumpSQLExceptions(e);
+ }
+ rs.close();
+
+ 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();
+
+ 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();
+
+ 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("---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][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,checkAgainstColumn, "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
+
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);
+
+ 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);
+
+ 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);
+
+ 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 selfReferencingT1
FOR UPDATE");
+ rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
rs.next();
- System.out.println("column 1 on this row is " +
rs.getString(1));
- System.out.println("this delete row will cause the
delete cascade constraint to delete all the rows from the table and from the
resultset");
- rs.deleteRow();
- 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.deleteRow();
- System.out.println("FAIL!!! there should have
be no more rows in the resultset at this point because delete cascade deleted
all the rows");
+ 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("expected exception
" + e.getMessage());
- } else
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
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
selfReferencingT1"));
+ 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 Test15 - With
autocommit off, attempt to drop a table when there is an open updatable
resultset on it");
- reloadData();
- conn.setAutoCommit(false);
+
+ 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 1, 2 FROM t1 FOR UPDATE");
+ rs = stmt.executeQuery("SELECT * 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");
+ rs.cancelRowUpdates();
+ //have to close the resultset because by default,
resultsets are held open over commit
+ rs.close();
+
+ 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();
+
+ 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("X0X95")) {
- System.out.println("expected exception
" + e.getMessage());
- } else
+ if (e.getSQLState().equals("24000"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
dumpSQLExceptions(e);
}
- System.out.println("Since autocommit is off, the drop
table exception will NOT result in a runtime rollback and hence updatable
resultset object is still open");
- rs.deleteRow();
+ 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();
- conn.setAutoCommit(true);
+
+ 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"));
+
+ 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"));
+
+ 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"));
- System.out.println("---Positive Test16 - Do deleteRow
within a transaction and then rollback the transaction");
- reloadData();
- conn.setAutoCommit(false);
+ System.out.println("---Positive Test31a - case
sensitive table and column names");
+ stmt.executeUpdate("create table \"t1\" (\"c11\" int,
c12 int)");
+ stmt.executeUpdate("insert into \"t1\" values(1, 2),
(2,3)");
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");
+ rs = stmt.executeQuery("SELECT \"c11\", \"C12\" FROM
\"t1\" 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.updateInt(1,11);
+ rs.updateInt(2,22);
+ rs.updateRow();
+ rs.next();
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 deleteRow in
transaction, row count is 3 in tableWithDeleteTriggers");
- dumpRS(stmt.executeQuery("select count(*) from
tableWithDeleteTriggers"));
- //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"));
- conn.setAutoCommit(true);
+ System.out.println(" Make sure that changes made it to
the database correctly");
+ dumpRS(stmt.executeQuery("select * from \"t1\""));
- System.out.println("---Positive Test17 - After
deleteRow, resultset is positioned before the next row");
- reloadData();
+ System.out.println("---Positive Test31b - table and
column names with spaces in middle and end");
+ stmt.executeUpdate("create table \" t 11 \" (\" c 111
\" int, c112 int)");
+ stmt.executeUpdate("insert into \" t 11 \" values(1,
2), (2,3)");
stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
- rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
+ rs = stmt.executeQuery("SELECT \" c 111 \", \"C112\"
FROM \" t 11 \" FOR UPDATE");
rs.next();
+ rs.updateInt(1,11);
+ rs.updateInt(2,22);
+ rs.updateRow();
+ rs.next();
rs.deleteRow();
- System.out.println("getXXX right after deleteRow will fail because
resultset is not positioned on a row, instead it is right before the next row");
+ rs.close();
+ System.out.println(" Make sure for table \" t 11 \"
that changes made it to the database correctly");
+ dumpRS(stmt.executeQuery("select * from \" t 11 \""));
+
+ System.out.println("---Positive Test32 - call updateXXX
methods on column that is not in for update columns list");
+ dumpRS(stmt.executeQuery("select * from t1"));
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ rs = stmt.executeQuery("SELECT c1, c2 FROM t1 FOR
UPDATE of c1");
+ rs.next();
+ rs.updateInt(2,22);
try {
- System.out.println("column 1 (which is not
nullable) after deleteRow is " + rs.getString(1));
+ rs.updateRow();
+ System.out.println("FAIL!!! updateRow should
have failed because c12 is not the FOR UPDATE columns list.");
}
catch (SQLException e) {
- if (e.getSQLState().equals("24000")) {
- System.out.println("expected exception
" + e.getMessage());
- } else
+ if (e.getSQLState().equals("42X31"))
+ System.out.println("Got expected
exception " + e.getMessage());
+ else
dumpSQLExceptions(e);
}
rs.close();
+ System.out.println(" Make sure the contents of table
are unchanged");
+ dumpRS(stmt.executeQuery("select * from t1"));
+ System.out.println("---Positive Test33 - try to update
a table from another schema");
+ System.out.println(" contents of table t1 from current
schema");
+ dumpRS(stmt.executeQuery("select * from t1"));
+ stmt =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ stmt.executeUpdate("create schema s2");
+ stmt.executeUpdate("create table s2.t1 (c1s2t1 int,
c2s2t1 smallint, c3s2t2 double)");
+ stmt.executeUpdate("insert into s2.t1
values(1,2,2.2),(1,3,3.3)");
+ System.out.println(" contents of table t1 from schema
s2");
+ dumpRS(stmt.executeQuery("select * from s2.t1"));
+ System.out.println(" Try to change contents of 2nd
column of s2.t1 using updateRow");
+ rs = stmt.executeQuery("SELECT * FROM s2.t1 FOR
UPDATE");
+ rs.next();
+ rs.updateInt(2,1);
+ rs.updateRow();
+ rs.next();
+ rs.updateInt(2,1);
+ rs.updateRow();
+ rs.close();
+ System.out.println(" Make sure that changes made to
the right table t1");
+ System.out.println(" contents of table t1 from current
schema should have remained unchanged");
+ dumpRS(stmt.executeQuery("select * from t1"));
+ System.out.println(" contents of table t1 from schema
s2 should have changed");
+ dumpRS(stmt.executeQuery("select * from s2.t1"));
+
teardown();
conn.close();
@@ -735,6 +2199,79 @@
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 == 18){ //verifying updateBoolean
+ if(rs.getBoolean(sqlType) != rs1.getBoolean(1))
+ return(false);
+ else
+ return(true);
+ }
+
+ 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
{
@@ -797,16 +2334,32 @@
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 tableWithDeleteTriggers");
- stmt.executeUpdate("insert into tableWithDeleteTriggers values
(1, 1), (2, 2), (3, 3), (4, 4)");
- stmt.executeUpdate("delete from
deleteTriggerInsertIntoThisTable");
- }
+ 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();
@@ -816,13 +2369,18 @@
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 table0WithTriggers (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("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)");
+
stmt.executeUpdate("insert into t1 values (1,'aa')");
stmt.executeUpdate("insert into t1 values (2,'bb')");
stmt.executeUpdate("insert into t1 values (3,'cc')");
@@ -831,9 +2389,36 @@
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 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();
}
@@ -846,10 +2431,13 @@
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("drop table selfReferencingT1");
- conn.commit();
+ 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();
}
@@ -858,7 +2446,7 @@
Statement s = null;
ResultSet infors = null;
-
+
try {
rs.close(); // need to close to get statistics
s =conn.createStatement();
@@ -883,3 +2471,4 @@
}
}
+
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
(revision 157479)
+++
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 157479)
+++
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/parameterMapping.out
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/master/parameterMapping.out
(revision 157479)
+++
java/testing/org/apache/derbyTesting/functionTests/master/parameterMapping.out
(working copy)
@@ -2386,8 +2386,7 @@
setNull(235350345) IC
setXXX() with all JDBC Types on CLOB(1k)
For setXXX() methods that pass an object, a null and valid values are checked
- setByte() java.lang.Throwable: FRED
-IC JDBC MATCH (INVALID)
+ setByte() IC JDBC MATCH (INVALID)
setShort() IC JDBC MATCH (INVALID)
setInt() IC JDBC MATCH (INVALID)
setLong() IC JDBC MATCH (INVALID)
Index:
java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
(revision 157479)
+++
java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
(working copy)
@@ -1,4 +1,4 @@
-Start testing delete using JDBC2.0 updateable resultset apis
+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
@@ -9,39 +9,54 @@
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.
----Negative Test3 - request a read only resultset and attempt deleteRow on it
+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.
----Negative Test4 - request a read only resultset and send a sql with FOR
UPDATE clause and attempt deleteRow on it
+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.
----Negative Test7 - attempt to deleteRow on updatable resultset when the
resultset is not positioned on a row
+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.
----Negative Test8 - attempt deleteRow on updatable resultset after closing the
resultset
+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
@@ -52,12 +67,22 @@
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.
----Positive Test1 - request updatable resultset for forward only type resultset
+---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
@@ -70,6 +95,17 @@
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
@@ -80,7 +116,7 @@
1
-
{2}
----Positive Test3 - use prepared statement with concur updatable status
+---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
@@ -91,6 +127,20 @@
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
@@ -105,7 +155,7 @@
---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
+---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
@@ -114,7 +164,16 @@
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
+---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
--- ---
@@ -123,16 +182,46 @@
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
+---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 Test9 - using correlation name for the table in the select sql is
not a problem
+---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 'SQLCUR10' is not on a row.
+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.
@@ -200,7 +289,7 @@
null qualifiers:
None
statement's fetch size is 200
----Positive Test12 - make sure delete trigger gets fired when deleteRow is
issued
+---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
-
@@ -211,32 +300,77 @@
1
-
{1}
----Positive Test13 - Another test case for delete trigger
+---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
anotherTableWithDeleteTriggers
+Verify that delete trigger got fired by verifying the row count to be 0 in
table1WithTriggers
1
-
{0}
----Positive Test14 - make sure self referential delete cascade works when
deleteRow is issued
+---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
anotherTableWithDeleteTriggers
+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 Test16 - Do deleteRow within a transaction and then rollback the
transaction
+---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 tableWithDeleteTriggers
+Verify that before deleteRow, row count is 4 in table0WithTriggers
1
-
{4}
@@ -246,7 +380,7 @@
1
-
{1}
-Verify that deleteRow in transaction, row count is 3 in tableWithDeleteTriggers
+Verify that deleteRow in transaction, row count is 3 in table0WithTriggers
1
-
{3}
@@ -254,11 +388,2350 @@
1
-
{0}
-Verify that after rollback, row count is back to 4 in tableWithDeleteTriggers
+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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ Testing updateTime on SQL type SMALLINT
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ Testing updateTimestamp on SQL type SMALLINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ Testing updateTime on SQL type INTEGER
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ Testing updateTimestamp on SQL type INTEGER
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ Testing updateTime on SQL type BIGINT
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ Testing updateTimestamp on SQL type BIGINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ Testing updateTime on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ Testing updateTimestamp on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ Testing updateTime on SQL type REAL
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ Testing updateTimestamp on SQL type REAL
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ Testing updateTime on SQL type DOUBLE
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ Testing updateTimestamp on SQL type DOUBLE
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type CHAR(60)
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type CHAR(60)
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type CHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type CHAR(60)
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type CHAR(60)
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ 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
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type CHAR(60)
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type VARCHAR(60)
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type VARCHAR(60)
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type VARCHAR(60)
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type VARCHAR(60)
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ 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
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type LONG VARCHAR
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type LONG VARCHAR
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type LONG VARCHAR
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type LONG VARCHAR
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ 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
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ 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
+ Using column name as first parameter to updateBoolean
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateInt on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateLong on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateBigDecimal on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateFloat on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateDouble on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateString on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateTime on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateTimestamp on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateInt on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateLong on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateBigDecimal on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateFloat on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateDouble on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateString on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateTime on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateTimestamp on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateInt on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateLong on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateBigDecimal on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateFloat on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateDouble on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateString on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateTime on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateTimestamp on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ Testing updateInt on SQL type CLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ Testing updateLong on SQL type CLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ Testing updateBigDecimal on SQL type CLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ Testing updateFloat on SQL type CLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ Testing updateDouble on SQL type CLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'CLOB'.
+ Testing updateBytes on SQL type CLOB(1k)
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ Testing updateTime on SQL type CLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ Testing updateTimestamp on SQL type CLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ Testing updateInt on SQL type DATE
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ Testing updateLong on SQL type DATE
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ Testing updateBigDecimal on SQL type DATE
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ Testing updateFloat on SQL type DATE
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ Testing updateDouble on SQL type DATE
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'DATE'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'DATE'.
+ Testing updateBytes on SQL type DATE
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ Testing updateTimestamp on SQL type DATE
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ Testing updateInt on SQL type TIME
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ Testing updateLong on SQL type TIME
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ Testing updateBigDecimal on SQL type TIME
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ Testing updateFloat on SQL type TIME
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ Testing updateDouble on SQL type TIME
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'TIME'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'TIME'.
+ Testing updateBytes on SQL type TIME
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ 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
+ Using column name as first parameter to updateTimestamp
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ Testing updateInt on SQL type TIMESTAMP
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ Testing updateLong on SQL type TIMESTAMP
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ Testing updateBigDecimal on SQL type TIMESTAMP
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ Testing updateFloat on SQL type TIMESTAMP
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ Testing updateDouble on SQL type TIMESTAMP
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'TIMESTAMP'.
+ Testing updateBytes on SQL type TIMESTAMP
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ 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
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type TIMESTAMP
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ Testing updateInt on SQL type BLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ Testing updateLong on SQL type BLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ Testing updateBigDecimal on SQL type BLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ Testing updateFloat on SQL type BLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ Testing updateDouble on SQL type BLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ Testing updateString on SQL type BLOB(1k)
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'BLOB'.
+ Testing updateBytes on SQL type BLOB(1k)
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ Testing updateTime on SQL type BLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ Testing updateTimestamp on SQL type BLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ updateObject with column position & Boolean object as parameters
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ updateObject with column position & Boolean object as parameters
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ updateObject with column position & Boolean object as parameters
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ updateObject with column position & Boolean object as parameters
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ updateObject with column position & Boolean object as parameters
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ updateObject with column position & Boolean object as parameters
+ updateObject with column name & Boolean object as parameters
+ 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
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ updateObject with column name & bytes[] array as parameters
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ updateObject with column position & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ updateObject with column position & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ 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 }
+---Positive Test31a - case sensitive table and column names
+ Make sure that changes made it to the database correctly
+ c11,C12
+ --- ---
+ {11,22}
+---Positive Test31b - table and column names with spaces in middle and end
+ Make sure for table " t 11 " that changes made it to the database correctly
+ c 111 ,C112
+ ------- ----
+ {11,22}
+---Positive Test32 - call updateXXX methods on column that is not in for
update columns list
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+Got expected exception Column 'C2' is not in FOR UPDATE list of cursor
'SQLCUR1055'.
+ Make sure the contents of table are unchanged
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+---Positive Test33 - try to update a table from another schema
+ contents of table t1 from current schema
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+ contents of table t1 from schema s2
+ C1S2T1,C2S2T1,C3S2T2
+ ------ ------ ------
+ {1,2,2.2}
+ {1,3,3.3}
+ Try to change contents of 2nd column of s2.t1 using updateRow
+ Make sure that changes made to the right table t1
+ contents of table t1 from current schema should have remained unchanged
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+ contents of table t1 from schema s2 should have changed
+ C1S2T1,C2S2T1,C3S2T2
+ ------ ------ ------
+ {1,1,2.2}
+ {1,1,3.3}
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,3011 @@
+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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ Testing updateTime on SQL type SMALLINT
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ Testing updateTimestamp on SQL type SMALLINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ Testing updateTime on SQL type INTEGER
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ Testing updateTimestamp on SQL type INTEGER
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ Testing updateTime on SQL type BIGINT
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ Testing updateTimestamp on SQL type BIGINT
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ Testing updateTime on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ Testing updateTimestamp on SQL type DECIMAL(10,5)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ Testing updateTime on SQL type REAL
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ Testing updateTimestamp on SQL type REAL
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateString
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ Testing updateTime on SQL type DOUBLE
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ Testing updateTimestamp on SQL type DOUBLE
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type CHAR(60)
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type CHAR(60)
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type CHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type CHAR(60)
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type CHAR(60)
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ 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
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type CHAR(60)
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type VARCHAR(60)
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type VARCHAR(60)
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type VARCHAR(60)
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type VARCHAR(60)
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ 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
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type VARCHAR(60)
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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
+ Using column name as first parameter to updateBoolean
+ 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
+ Using column name as first parameter to updateShort
+ Testing updateInt on SQL type LONG VARCHAR
+ Using column position as first parameter to updateInt
+ Using column name as first parameter to updateInt
+ Testing updateLong on SQL type LONG VARCHAR
+ Using column position as first parameter to updateLong
+ Using column name as first parameter to updateLong
+ Testing updateBigDecimal on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBigDecimal
+ Using column name as first parameter to updateBigDecimal
+ Testing updateFloat on SQL type LONG VARCHAR
+ Using column position as first parameter to updateFloat
+ Using column name as first parameter to updateFloat
+ Testing updateDouble on SQL type LONG VARCHAR
+ Using column position as first parameter to updateDouble
+ Using column name as first parameter to updateDouble
+ 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
+ Using column name as first parameter to updateByte
+ Testing updateBytes on SQL type LONG VARCHAR
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ Testing updateTimestamp on SQL type LONG VARCHAR
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ 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
+ Using column name as first parameter to updateBoolean
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateInt on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateLong on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateBigDecimal on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateFloat on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateDouble on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateString on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateTime on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ Testing updateTimestamp on SQL type CHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateInt on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateLong on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateBigDecimal on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateFloat on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateDouble on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateString on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateTime on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Testing updateTimestamp on SQL type VARCHAR(2) FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateInt on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateLong on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateBigDecimal on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateFloat on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateDouble on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateString on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateTime on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Testing updateTimestamp on SQL type LONG VARCHAR FOR BIT DATA
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ Testing updateInt on SQL type CLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ Testing updateLong on SQL type CLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ Testing updateBigDecimal on SQL type CLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ Testing updateFloat on SQL type CLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ Testing updateDouble on SQL type CLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'CLOB'.
+ Testing updateBytes on SQL type CLOB(1k)
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ Testing updateTime on SQL type CLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ Testing updateTimestamp on SQL type CLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ Testing updateInt on SQL type DATE
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ Testing updateLong on SQL type DATE
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ Testing updateBigDecimal on SQL type DATE
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ Testing updateFloat on SQL type DATE
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ Testing updateDouble on SQL type DATE
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'DATE'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'DATE'.
+ Testing updateBytes on SQL type DATE
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ Testing updateTimestamp on SQL type DATE
+ Using column position as first parameter to updateTimestamp
+ Using column name as first parameter to updateTimestamp
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ Testing updateInt on SQL type TIME
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ Testing updateLong on SQL type TIME
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ Testing updateBigDecimal on SQL type TIME
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ Testing updateFloat on SQL type TIME
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ Testing updateDouble on SQL type TIME
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'TIME'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'TIME'.
+ Testing updateBytes on SQL type TIME
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ 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
+ Using column name as first parameter to updateTimestamp
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ Testing updateInt on SQL type TIMESTAMP
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ Testing updateLong on SQL type TIMESTAMP
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ Testing updateBigDecimal on SQL type TIMESTAMP
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ Testing updateFloat on SQL type TIMESTAMP
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ Testing updateDouble on SQL type TIMESTAMP
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'TIMESTAMP'.
+ Testing updateBytes on SQL type TIMESTAMP
+ Using column position as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateBytes
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ 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
+ Using column name as first parameter to updateDate
+ Testing updateTime on SQL type TIMESTAMP
+ Using column position as first parameter to updateTime
+ Using column name as first parameter to updateTime
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateShort
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ Testing updateInt on SQL type BLOB(1k)
+ Using column position as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateInt
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ Testing updateLong on SQL type BLOB(1k)
+ Using column position as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateLong
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ Testing updateBigDecimal on SQL type BLOB(1k)
+ Using column position as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateBigDecimal
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ Testing updateFloat on SQL type BLOB(1k)
+ Using column position as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateFloat
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ Testing updateDouble on SQL type BLOB(1k)
+ Using column position as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateDouble
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ Testing updateString on SQL type BLOB(1k)
+ Using column position as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateString
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ 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 : An attempt was made to put a data value of type
'byte' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateByte
+ Got expected exception : An attempt was made to put a data value of type
'byte' into a data value of type 'BLOB'.
+ Testing updateBytes on SQL type BLOB(1k)
+ Using column position as first parameter to updateBytes
+ Using column name as first parameter to updateBytes
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateDate
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ Testing updateTime on SQL type BLOB(1k)
+ Using column position as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateTime
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ Testing updateTimestamp on SQL type BLOB(1k)
+ Using column position as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateTimestamp
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ Using column name as first parameter to updateBoolean
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'SMALLINT'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'SMALLINT'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'SMALLINT'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'SMALLINT'.
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'INTEGER'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'INTEGER'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'INTEGER'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'INTEGER'.
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'BIGINT'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BIGINT'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BIGINT'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BIGINT'.
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DECIMAL'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DECIMAL'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DECIMAL'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DECIMAL'.
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'REAL'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'REAL'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'REAL'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'REAL'.
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ updateObject with column name & String object as parameters
+ updateObject with column position & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DOUBLE'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'DOUBLE'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DOUBLE'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'DOUBLE'.
+ 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ 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
+ updateObject with column name & String object as parameters
+ 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' 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ 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
+ updateObject with column name & String object as parameters
+ 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' 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
+ updateObject with column name & Boolean object as parameters
+ 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
+ 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
+ updateObject with column name & String object as parameters
+ 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' 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
+ 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
'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
+ updateObject with column name & Boolean object as parameters
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'VARCHAR () FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'LONG VARCHAR FOR BIT DATA'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'CLOB'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'CLOB'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'CLOB'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'CLOB'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'CLOB'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'CLOB'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'CLOB'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'CLOB'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'DATE'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'DATE'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'DATE'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'DATE'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'DATE'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'DATE'.
+ 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
'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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'DATE'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIME'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIME'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIME'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIME'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIME'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'TIME'.
+ 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
'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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIME'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'TIMESTAMP'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & bytes[] array as parameters
+ Got expected exception : An attempt was made to put a data value of type
'byte[]' into a data value of type 'TIMESTAMP'.
+ 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
+ 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
'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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'TIMESTAMP'.
+ 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 : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ updateObject with column name & Short object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'short' into a data value of type 'BLOB'.
+ updateObject with column position & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ updateObject with column name & Integer object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'int' into a data value of type 'BLOB'.
+ updateObject with column position & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ updateObject with column name & Long object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'long' into a data value of type 'BLOB'.
+ updateObject with column position & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ updateObject with column name & BigDecimal object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.math.BigDecimal' into a data value of type 'BLOB'.
+ updateObject with column position & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ updateObject with column name & Float object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'float' into a data value of type 'BLOB'.
+ updateObject with column position & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ updateObject with column name & Double object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'double' into a data value of type 'BLOB'.
+ updateObject with column position & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ updateObject with column name & String object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.lang.String' into a data value of type 'BLOB'.
+ 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
'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 : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ updateObject with column name & Date object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Date' into a data value of type 'BLOB'.
+ updateObject with column position & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ updateObject with column name & Time object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Time' into a data value of type 'BLOB'.
+ updateObject with column position & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ updateObject with column name & TimeStamp object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'java.sql.Timestamp' into a data value of type 'BLOB'.
+ 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 : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ updateObject with column name & Boolean object as parameters
+ Got expected exception : An attempt was made to put a data value of type
'boolean' into a data value of type 'BLOB'.
+ 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 }
+---Positive Test31a - case sensitive table and column names
+ Make sure that changes made it to the database correctly
+ c11,C12
+ --- ---
+ {11,22}
+---Positive Test31b - table and column names with spaces in middle and end
+ Make sure for table " t 11 " that changes made it to the database correctly
+ c 111 ,C112
+ ------- ----
+ {11,22}
+---Positive Test32 - call updateXXX methods on column that is not in for
update columns list
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+Got expected exception Column 'C2' is not in FOR UPDATE list of cursor
'SQLCUR1191'.
+ Make sure the contents of table are unchanged
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+---Positive Test33 - try to update a table from another schema
+ contents of table t1 from current schema
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+ contents of table t1 from schema s2
+ C1S2T1,C2S2T1,C3S2T2
+ ------ ------ ------
+ {1,2,2.2}
+ {1,3,3.3}
+ Try to change contents of 2nd column of s2.t1 using updateRow
+ Make sure that changes made to the right table t1
+ contents of table t1 from current schema should have remained unchanged
+ C1,C2
+ -- --
+ {22,xxxxxxx }
+ {2,bb }
+ {3,cc }
+ contents of table t1 from schema s2 should have changed
+ C1S2T1,C2S2T1,C3S2T2
+ ------ ------ ------
+ {1,1,2.2}
+ {1,1,3.3}
+Finished testing updateable resultsets
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
___________________________________________________________________
Name: svn:eol-style
+ native