/*
 * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

/*
 * @(#)prepStmtClient14.java	1.9 02/01/12
 */


package com.sun.cts.tests.jdbc.ee.prepStmt.prepStmt14;

import java.io.*;
import java.util.*;
import java.math.*;
import java.sql.*;
import javax.sql.*;

import com.sun.cts.util.*;
import com.sun.cts.porting.*;
import com.sun.cts.harness.*;

import java.rmi.RemoteException;
import javasoft.sqe.javatest.Status;
import com.sun.cts.tests.jdbc.ee.common.*;


// Merant DataSource class
//import com.merant.sequelink.jdbcx.datasource.*;


/**
 * The prepStmtClient14 class tests methods of PreparedStatement interface using 
 * Sun's J2EE Reference Implementation.
 * @author  
 * @version 1.8, 11/24/00
 */

public class prepStmtClient14 extends ServiceEETest implements Serializable
{
	private static final String testName = "jdbc.ee.prepStmt.prepStmt14";

	//Naming specific member variables
	private CTSNamingContextInterface jc = null;

	//Harness requirements 

	private transient Connection conn = null;
	private ResultSet rs = null;
	private Statement stmt = null;
	private PreparedStatement pstmt = null;
	private transient DatabaseMetaData dbmd = null;
	private DataSource ds1 = null;
	private dbSchema dbSch = null;
	private rsSchema rsSch = null;
	private csSchema csSch = null;
	private String drManager = null;
	private Properties sqlp = null;
	private Properties props = null;

	/* Run test in standalone mode */
	public static void main(String[] args)
	{
		prepStmtClient14 theTests = new prepStmtClient14();
		Status s = theTests.run(args, System.out, System.err);
		s.exit();
	}



	/*  Test setup: */
	/*
	 *	@class.setup_props: Driver, the Driver name;
	 *			db1, the database name with url;
	 *			user1, the database user name;
	 *			password1, the database password;
	 *			db2, the database name with url;
	 *			user2, the database user name;
	 *			password2, the database password;
	 *			DriverManager, flag for DriverManager;
	 *			ptable, the primary table;
	 *			ftable, the foreign table;
	 *			cofSize, the initial size of the ptable;
	 *			cofTypeSize, the initial size of the ftable;
	 *			binarySize, size of binary data type;
	 *			varbinarySize, size of varbinary data type;
	 *			longvarbinarySize, size of longvarbinary data type;
	 *	@class.testArgs:     -ap ctssql.stmt
	 */

	public void setup(String[] args, Properties p) throws Fault
	{
		try
		{
			try
			{
				drManager = p.getProperty("DriverManager","");
				if(drManager.length() == 0)
					throw new Fault("Invalid DriverManager Name");
				/*sqlp = new Properties();
				String sqlStmt = p.getProperty("rsQuery","");
				InputStream istr = new FileInputStream(sqlStmt);
				sqlp.load(istr);*/
				sqlp = p;
				props = p;

				if(drManager.equals("yes"))
				{
					logMsg("Using DriverManager");
					DriverManagerConnection dmCon = new DriverManagerConnection();
					conn = dmCon.getConnection(p);
				}
				else
				{
					logMsg("Using DataSource");
					DataSourceConnection dsCon = new DataSourceConnection();
					conn = dsCon.getConnection(p);
				}
				stmt = conn.createStatement();
				dbmd = conn.getMetaData();
				rsSch = new rsSchema();
				csSch = new csSchema();

			}
			catch(SQLException ex)
			{
				logErr("SQL Exception: " + ex.getMessage());
			}
		}
		catch(Exception e)
		{
			logErr("Setup Failed!");
			TestUtil.printStackTrace(e);
		}
	}



	/*
	 * @testName:       testSetObject203
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *                    
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Float_Tab with the minimum value of 
	 *                  Float_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject203() throws Fault 
	{
		Double oMinFloatVal = null;
		Double rFloatVal = null;
		String sminFloatVal = null;
		Double minFloatVal = null;

		try
		{
			// to create the Float Table
			rsSch.createTab("Float_Tab",sqlp,conn);

			// to update Null value column with Minimum 
			String sPrepStmt = sqlp.getProperty("Float_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Double to be Updated 
			sminFloatVal = rsSch.extractVal("Float_Tab",2,sqlp,conn);

			oMinFloatVal = new Double(sminFloatVal);
			minFloatVal = new Double(sminFloatVal);
			logMsg("Minimum Float Value: " + oMinFloatVal.toString());

			// get the PreparedStatement object
			PreparedStatement pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinFloatVal,java.sql.Types.FLOAT);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Float_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rFloatVal = (Double) rs.getObject(1);
			logMsg("Returned Float Value after Updation: " + rFloatVal);
			logMsg("Value returned from ctssql.stmt: " + minFloatVal);

			if(rFloatVal.equals(minFloatVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Float_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject204
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Double_Tab with the maximum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject204() throws Fault
	{
		Double rDoubleVal = null;
		String smaxDoubleVal = null;
		Double maxDoubleVal = null;

		try
		{
			// to create the Double Table
			rsSch.createTab("Double_Tab",sqlp,conn);

			// to update Minimum value column with maximum 
			String sPrepStmt = sqlp.getProperty("Double_Tab_Min_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Double to be Updated 
			smaxDoubleVal = rsSch.extractVal("Double_Tab",1,sqlp,conn);

			maxDoubleVal = new Double(smaxDoubleVal);
			logMsg("Maximum Double Value: " + maxDoubleVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxDoubleVal,java.sql.Types.DOUBLE);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Min_Val_Query = sqlp.getProperty("Double_Query_Min","");
			logMsg(Min_Val_Query);
			rs = stmt.executeQuery(Min_Val_Query);
			rs.next();

			rDoubleVal = (Double) rs.getObject(1);
			logMsg("Returned Double Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + maxDoubleVal);

			if(rDoubleVal.equals(maxDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Double_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject205
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Double_Tab with the minimum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject205() throws Fault
	{
		Double rDoubleVal = null;
		String sminDoubleVal = null;
		Double minDoubleVal = null;

		try
		{
			// to create the Double Table
			rsSch.createTab("Double_Tab",sqlp,conn);

			// to update Maximum value column with Minimum 
			String sPrepStmt = sqlp.getProperty("Double_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Double to be Updated 
			sminDoubleVal = rsSch.extractVal("Double_Tab",2,sqlp,conn);

			minDoubleVal = new Double(sminDoubleVal);
			logMsg("Minimum Double Value: " + minDoubleVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minDoubleVal,java.sql.Types.DOUBLE);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Double_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rDoubleVal = (Double) rs.getObject(1);
			logMsg("Returned Double Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + minDoubleVal);

			if(rDoubleVal.equals(minDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Double_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject206
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Decimal_Tab with the maximum value of 
	 *                  Decimal_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject206() throws Fault
	{
		Double oMaxDecimalVal = null;
		BigDecimal rDecimalVal = null;
		String smaxDecimalVal = null;
		BigDecimal maxDecimalVal = null;

		try
		{
			// to create the Decimal Table
			rsSch.createTab("Decimal_Tab",sqlp,conn);

			// to update Null value column with maximum value of Double
			String sPrepStmt = sqlp.getProperty("Decimal_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Decimal to be Updated in Decimal Table
			smaxDecimalVal = rsSch.extractVal("Decimal_Tab",1,sqlp,conn);

			oMaxDecimalVal = new Double(smaxDecimalVal);
			maxDecimalVal = new BigDecimal(smaxDecimalVal);
			logMsg("Maximum Double Value to be updated in Decimal Table: " + oMaxDecimalVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxDecimalVal,java.sql.Types.DECIMAL,15);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Decimal_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rDecimalVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Decimal Value after Updation: " + rDecimalVal);
			logMsg("Value returned from ctssql.stmt: " + maxDecimalVal);

			if(rDecimalVal.compareTo(maxDecimalVal) == 0)
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Decimal_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject207
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Decimal_Tab with the minimum value of 
	 *                  Decimal_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject207() throws Fault
	{
		Double oMinDecimalVal = null;
		BigDecimal rDecimalVal = null;
		String sminDecimalVal = null;
		BigDecimal minDecimalVal = null;

		try
		{
			// to create the Decimal Table
			rsSch.createTab("Decimal_Tab",sqlp,conn);

			// to update Maximum value column with Minimum value of Double
			String sPrepStmt = sqlp.getProperty("Decimal_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Double to be Updated in Decimal Table
			sminDecimalVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);

			oMinDecimalVal = new Double(sminDecimalVal);
			minDecimalVal = new BigDecimal(sminDecimalVal);
			logMsg("Minimum Double Value to be updated in Decimal Table: " + oMinDecimalVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinDecimalVal,java.sql.Types.DECIMAL,15);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Decimal_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rDecimalVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Decimal Value after Updation: " + rDecimalVal);
			logMsg("Value returned from ctssql.stmt: " + minDecimalVal);

			if(rDecimalVal.compareTo(minDecimalVal) == 0)
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Decimal_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject208
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Numeric_Tab with the maximum value of 
	 *                  Numeric_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject208() throws Fault
	{
		Double oMaxNumericVal = null;
		BigDecimal rNumericVal = null;
		String smaxNumericVal = null;
		BigDecimal maxNumericVal = null;

		try
		{
			// to create the Numeric Table
			rsSch.createTab("Numeric_Tab",sqlp,conn);

			// to update Null value column with maximum value of Double
			String sPrepStmt = sqlp.getProperty("Numeric_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Numeric to be Updated in Numeric Table
			smaxNumericVal = rsSch.extractVal("Numeric_Tab",1,sqlp,conn);

			oMaxNumericVal = new Double(smaxNumericVal);
			maxNumericVal = new BigDecimal(smaxNumericVal);
			logMsg("Maximum Double Value to be updated in Numeric Table: " + oMaxNumericVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxNumericVal,java.sql.Types.NUMERIC,15);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Numeric_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rNumericVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Numeric Value after Updation: " + rNumericVal);
			logMsg("Value returned from ctssql.stmt: " + maxNumericVal);

			if(rNumericVal.compareTo(maxNumericVal) == 0)
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject209
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Numeric_Tab with the minimum value of 
	 *                  Numeric_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject209() throws Fault
	{
		Double oMinNumericVal = null;
		BigDecimal rNumericVal = null;
		String sminNumericVal = null;
		BigDecimal minNumericVal = null;

		try
		{
			// to create the Numeric Table
			rsSch.createTab("Numeric_Tab",sqlp,conn);

			// to update Null value column with Minimum value of Double
			String sPrepStmt = sqlp.getProperty("Numeric_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Double to be Updated in Numeric Table
			sminNumericVal = rsSch.extractVal("Numeric_Tab",2,sqlp,conn);

			oMinNumericVal = new Double(sminNumericVal);
			minNumericVal = new BigDecimal(sminNumericVal);
			logMsg("Minimum Double Value to be updated in Numeric Table: " + oMinNumericVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinNumericVal,java.sql.Types.NUMERIC,15);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Numeric_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rNumericVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Numeric Value after Updation: " + rNumericVal);
			logMsg("Value returned from ctssql.stmt: " + minNumericVal);

			if(rNumericVal.compareTo(minNumericVal) == 0)
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject210
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Bit_Tab with the maximum value of 
	 *                  Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject210() throws Fault
	{
		Double oMaxBooleanVal = null;
		String smaxBooleanVal = null;
		Boolean rBooleanVal = null;
		Boolean maxBooleanVal = null;
		boolean booleanVal;

		try
		{
			// to create the Bit Table
			rsSch.createTab("Bit_Tab",sqlp,conn);

			// to update Null value column of Bit table 
			String sPrepStmt = sqlp.getProperty("Bit_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Bit to be Updated in Bit Table
			smaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);

			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				logMsg("database supports Boolean datatype.");
				maxBooleanVal = new Boolean(smaxBooleanVal);
				if(smaxBooleanVal.equalsIgnoreCase("true"))
				{
					smaxBooleanVal = "1";
				}
				else
				{
					smaxBooleanVal = "0";
				}
			}
			else
			{
				booleanVal = (smaxBooleanVal.trim().equals("1"))? true : false;
				maxBooleanVal = new Boolean(booleanVal);
			}

			oMaxBooleanVal = new Double(smaxBooleanVal);
			logMsg("Maximum Bit Value to be updated :" + maxBooleanVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxBooleanVal,java.sql.Types.BIT);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Bit_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rBooleanVal = (Boolean) rs.getObject(1);
			logMsg("Returned String Value after Updation: " + rBooleanVal);
			logMsg("Value returned from ctssql.stmt: " + maxBooleanVal);

			if(rBooleanVal.equals(maxBooleanVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Bit_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject211
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Bit_Tab with the minimum value of 
	 *                  Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */
 
 	public void testSetObject211() throws Fault
	{
		Double oMinBooleanVal = null;
		String sminBooleanVal = null;
		Boolean rBooleanVal = null;
		Boolean minBooleanVal = null;
		boolean booleanVal;

		try
		{
			// to create the Bit Table
			rsSch.createTab("Bit_Tab",sqlp,conn);

			// to update Null value column with Minimum value of Bit
			String sPrepStmt = sqlp.getProperty("Bit_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Bit to be Updated 
			sminBooleanVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);

			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				logMsg("database supports Boolean datatype.");
				minBooleanVal = new Boolean(sminBooleanVal);
				if(sminBooleanVal.equalsIgnoreCase("true"))
				{
					sminBooleanVal = "1";
				}
				else
				{
					sminBooleanVal = "0";
				}
			}
			else
			{
				booleanVal = (sminBooleanVal.trim().equals("1"))? true : false;
				minBooleanVal = new Boolean(booleanVal);
			}

			oMinBooleanVal = new Double(sminBooleanVal);
			logMsg("Minimum Bit Value to be updated :" + minBooleanVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinBooleanVal,java.sql.Types.BIT);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Bit_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rBooleanVal = (Boolean) rs.getObject(1);
			logMsg("Returned Boolean Value after Updation: " + rBooleanVal);
			logMsg("Value returned from ctssql.stmt: " + minBooleanVal);

			if(rBooleanVal.equals(minBooleanVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Bit_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject212
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Char_Tab with the maximum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */
	public void testSetObject212() throws Fault
	{
		Double oMaxDoubleVal = null;
		String smaxDoubleVal = null;
		String rStringVal = null;
		Double rDoubleVal = null;

		try
		{
			// to create the Char Table
			rsSch.createTab("Char_Tab",sqlp,conn);

			// to update Null value column of Char table with maximum value of Double
			String sPrepStmt = sqlp.getProperty("Char_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Double to be Updated in Char Table
			smaxDoubleVal = rsSch.extractVal("Double_Tab",1,sqlp,conn);

			oMaxDoubleVal = new Double(smaxDoubleVal);
			logMsg("Maximum Double Value to be updated in Char Table: " + smaxDoubleVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxDoubleVal,java.sql.Types.CHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Char_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = (String) rs.getObject(1);
			rDoubleVal = new Double(rStringVal);
			rStringVal = rStringVal.trim();
			logMsg("Returned String Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + oMaxDoubleVal);

			if(rDoubleVal.equals(oMaxDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject213
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Char_Tab with the minimum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject213() throws Fault
	{
		Double oMinDoubleVal = null;
		String sminDoubleVal = null;
		String rStringVal = null;
		Double rDoubleVal = null;

		try
		{
			// to create the Char Table
			rsSch.createTab("Char_Tab",sqlp,conn);

			// to update Null value column with minimum value of Double
			String sPrepStmt = sqlp.getProperty("Char_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Double to be Updated in Char Table
			sminDoubleVal = rsSch.extractVal("Double_Tab",2,sqlp,conn);

			oMinDoubleVal = new Double(sminDoubleVal);
			logMsg("Minimum Double Value to be updated in Char Table: " + oMinDoubleVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinDoubleVal,java.sql.Types.CHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Char_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = (String) rs.getObject(1);
			rDoubleVal = new Double(rStringVal);
			logMsg("Returned Double Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + oMinDoubleVal);

			if(rDoubleVal.equals(oMinDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject214
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Varchar_Tab with the maximum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject214() throws Fault
	{
		Double oMaxDoubleVal = null;
		String smaxDoubleVal = null;
		String rStringVal = null;
		Double rDoubleVal = null;

		try
		{
			// to create the Varchar Table
			rsSch.createTab("Varchar_Tab",sqlp,conn);

			// to update Null value column of Varchar table with maximum value of Double
			String sPrepStmt = sqlp.getProperty("Varchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Double to be Updated in Varchar Table
			smaxDoubleVal = rsSch.extractVal("Double_Tab",1,sqlp,conn);

			oMaxDoubleVal = new Double(smaxDoubleVal);
			logMsg("Maximum Double Value to be updated in Varchar Table: " + smaxDoubleVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxDoubleVal,java.sql.Types.VARCHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Varchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = (String) rs.getObject(1);
			rDoubleVal = new Double(rStringVal);
			rStringVal = rStringVal.trim();
			logMsg("Returned String Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + oMaxDoubleVal);

			if(rDoubleVal.equals(oMaxDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Varchar_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject215
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Varchar_Tab with the minimum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject215() throws Fault
	{
		Double oMinDoubleVal = null;
		String sminDoubleVal = null;
		String rStringVal = null;
		Double rDoubleVal = null;

		try
		{
			// to create the Varchar Table
			rsSch.createTab("Varchar_Tab",sqlp,conn);

			// to update Null value column with Minimum value of Double
			String sPrepStmt = sqlp.getProperty("Varchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Double to be Updated in Varchar Table
			sminDoubleVal = rsSch.extractVal("Double_Tab",2,sqlp,conn);

			oMinDoubleVal = new Double(sminDoubleVal);
			logMsg("Minimum Double Value to be updated in Varchar Table: " + oMinDoubleVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinDoubleVal,java.sql.Types.VARCHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Varchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = (String) rs.getObject(1);
			rDoubleVal = new Double(rStringVal);
			logMsg("Returned Double Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + oMinDoubleVal);

			if(rDoubleVal.equals(oMinDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Varchar_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject216
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Longvarchar_Tab with the maximum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */



	public void testSetObject216() throws Fault
	{
		Double oMaxDoubleVal = null;
		String smaxDoubleVal = null;
		String rStringVal = null;
		Double rDoubleVal = null;

		try
		{
			// to create the Longvarchar Table
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);

			// to update Null value column of Longvarchar table with maximum value of Double
			String sPrepStmt = sqlp.getProperty("Longvarchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Double to be Updated in Longvarchar Table
			smaxDoubleVal = rsSch.extractVal("Double_Tab",1,sqlp,conn);

			oMaxDoubleVal = new Double(smaxDoubleVal);
			logMsg("Maximum Double Value to be updated in Longvarchar Table: " + smaxDoubleVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxDoubleVal,java.sql.Types.LONGVARCHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Longvarchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = (String) rs.getObject(1);
			rDoubleVal = new Double(rStringVal);
			rStringVal = rStringVal.trim();
			logMsg("Returned String Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + oMaxDoubleVal);

			if(rDoubleVal.equals(oMaxDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Longvarcharnull_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject217
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Longvarchar_Tab with the minimum value of 
	 *                  Double_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject217() throws Fault
	{
		Double oMinDoubleVal = null;
		String sminDoubleVal = null;
		String rStringVal = null;
		Double rDoubleVal = null;

		try
		{
			// to create the Longvarchar Table
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);

			// to update Null value column with minimum value of Double
			String sPrepStmt = sqlp.getProperty("Longvarchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Double to be Updated in Longvarchar Table
			sminDoubleVal = rsSch.extractVal("Double_Tab",2,sqlp,conn);

			oMinDoubleVal = new Double(sminDoubleVal);
			logMsg("Minimum Double Value to be updated in Longvarchar Table: " + oMinDoubleVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinDoubleVal,java.sql.Types.LONGVARCHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Longvarchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = (String) rs.getObject(1);
			rDoubleVal = new Double(rStringVal);
			logMsg("Returned Double Value after Updation: " + rDoubleVal);
			logMsg("Value returned from ctssql.stmt: " + oMinDoubleVal);

			if(rDoubleVal.equals(oMinDoubleVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Longvarcharnull_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject218
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Numeric_Tab with the minimum value of 
	 *                  Numeric_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject218() throws Fault
	{
		byte retByteArr[] = null;
		String binarySize = null;

		try
		{
			rsSch.createTab("Binary_Tab",sqlp,conn);
			// to extract the Binary Table size from property file
			binarySize = props.getProperty("binarySize");
			logMsg("Binary Table Size: " + binarySize);

			String sPrepStmt = sqlp.getProperty("Binary_Tab_Val_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			int bytearrsize = Integer.parseInt(binarySize);
			logMsg("Binary Size: " + bytearrsize);

			byte[] bytearr = new byte[bytearrsize];
			String sbyteval = null;

			// to get the bytearray value
			for (int count = 0;count<bytearrsize;count++)
			{
				sbyteval = Integer.toString(count%255);
				bytearr[count] = Byte.parseByte(sbyteval);
			}

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,bytearr,java.sql.Types.BINARY);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Binary_Val_Query = sqlp.getProperty("Binary_Query_Val","");
			logMsg(Binary_Val_Query);
			rs = stmt.executeQuery(Binary_Val_Query);
			rs.next();

			retByteArr = (byte[]) rs.getObject(1);

			for(int i = 0;i<bytearrsize;i++)
			{
				//logMsg("byteArray Value: " + retByteArr[i]);
				if(retByteArr[i] != bytearr[i])
				{
					logErr("setObject Method does not set the designated parameter with the object");
					throw new Fault("Call to setObject Method is Failed!");
				}
			}
			logMsg("setObject Method sets the designated parameter with the object");

		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Binary_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject219
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Numeric_Tab with the minimum value of 
	 *                  Numeric_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject219() throws Fault
	{
		byte retByteArr[] = null;
		String varbinarySize = null;

		try
		{
			rsSch.createTab("Varbinary_Tab",sqlp,conn);
			// to extract the Varbinary Table size from property file
			varbinarySize = props.getProperty("varbinarySize");
			logMsg("Varbinary Table Size: " + varbinarySize);

			String sPrepStmt = sqlp.getProperty("Varbinary_Tab_Val_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			int bytearrsize = Integer.parseInt(varbinarySize);
			logMsg("Varbinary Size: " + bytearrsize);

			byte[] bytearr = new byte[bytearrsize];
			String sbyteval = null;
			// to get the bytearray value
			for (int count = 0;count<bytearrsize;count++)
			{
				sbyteval = Integer.toString(count%255);
				bytearr[count] = Byte.parseByte(sbyteval);
			}

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,bytearr,java.sql.Types.VARBINARY);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Varbinary_Val_Query = sqlp.getProperty("Varbinary_Query_Val","");
			logMsg(Varbinary_Val_Query);
			rs = stmt.executeQuery(Varbinary_Val_Query);
			rs.next();

			retByteArr = (byte[]) rs.getObject(1);

			for(int i = 0;i<bytearrsize;i++)
			{
				//logMsg("byteArray Value: " + retByteArr[i]);
				if(retByteArr[i] != bytearr[i])
				{
					logErr("setObject Method does not set the designated parameter with the object");
					throw new Fault("Call to setObject Method is Failed!");
				}
			}
			logMsg("setObject Method sets the designated parameter with the object");

		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Varbinary_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject220
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Min_Val of Longvarbinary_Tab with the minimum value of 
	 *                  Longvarbinary_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the minimum value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject220() throws Fault
	{
		byte retByteArr[] = null;

		try
		{
			rsSch.createTab("Longvarbinary_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Longvarbinary_Tab_Val_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			// to get the byte array value to be updated 
			String binsize = props.getProperty("longvarbinarySize");
			int bytearrsize = Integer.parseInt(binsize);
			logMsg("Longvarbinary Size: " + bytearrsize);

			byte[] bytearr = new byte[bytearrsize];
			String sbyteval = null;
			// to get the bytearray value
			for(int count = 0;count<bytearrsize;count++)
			{
				sbyteval = Integer.toString(count%255);
				bytearr[count] = Byte.parseByte(sbyteval);
			}

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,bytearr,java.sql.Types.LONGVARBINARY);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Longvarbinary_Val_Query = sqlp.getProperty("Longvarbinary_Query_Val","");
			logMsg(Longvarbinary_Val_Query);
			rs = stmt.executeQuery(Longvarbinary_Val_Query);
			rs.next();

			retByteArr = (byte[]) rs.getObject(1);

			for(int i = 0;i<bytearrsize;i++)
			{
				logMsg("byteArray Value: " + retByteArr[i]);
				if(retByteArr[i] != bytearr[i])
				{
					logErr("setObject Method does not set the designated parameter with the object ");
					throw new Fault("Call to setObject Method is Failed!");
				}
			}
			logMsg("setObject Method sets the designated parameter with the object");

		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Longvarbinary_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject221
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Char_Tab with the maximum (mfg date) value of 
	 *                  Date_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum (mfg date) value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject221() throws Fault
	{
		String maxStringVal = null;
		String rStringVal = null;
		java.sql.Date maxDateVal = null;
		java.sql.Date rDateVal = null;

		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Char_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);
			//to extract the Value of Date from Date Table to be Updated in Null Column of Char Table 
			maxStringVal = rsSch.extractVal("Date_Tab",1,sqlp,conn); 
			maxStringVal = maxStringVal.substring(maxStringVal.indexOf('\'')+1,maxStringVal.lastIndexOf('\''));
			logMsg("String Value: " + maxStringVal);
			maxDateVal = java.sql.Date.valueOf(maxStringVal);
			logMsg("String Value: " + maxDateVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxDateVal,java.sql.Types.CHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			//to get the query string
			String Null_Val_Query = sqlp.getProperty("Char_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = (String)rs.getObject(1);
			rStringVal = rStringVal.trim();
			logMsg("Returned String Value after Updation: " + rStringVal);
			rDateVal = java.sql.Date.valueOf(rStringVal);
			logMsg("Returned Date Value after Updation: " + rDateVal);
			logMsg("Value returned from ctssql.stmt: " + maxDateVal);

			if(rDateVal.equals(maxDateVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:       testSetObject222
	 * @assertion:      A Prepared Statement object provides a way of calling 
	 *                  precompiled SQL statements.It can take one or more parameters 
	 *                  as input arguments(IN parameters). (See section 11.1.6 of 
	 *                  JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                  The drivers must provide full support for Prepared Statement 
	 *                  methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                  Edition(J2EE) specification v 1.2).
	 *
	 *                  The setObject(int parameterIndex, Object x) method sets the 
	 *                  value of the designated parameter using the given object. 
	 *                  The second parameter must be of type Object; therefore, the 
	 *                  java.lang equivalent objects should be used for built-in types. 
	 *
	 *                  The JDBC specification specifies a standard mapping from Java 
	 *                  Object types to SQL types. The given argument will be converted 
	 *                  to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:  Get a PreparedStatement object from the connection to the database.
	 *                  Using the setObject(int parameterIndex, Object x) method,update the 
	 *                  column Null_Val of Varchar_Tab with the maximum (mfg date) value of 
	 *                  Date_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                  value. Extract the maximum (mfg date) value from the ctssql.stmt file. 
	 *                  Compare this value with the value returned by the getObject(int columnno) 
	 *                  method. Both the values should be equal.
	 */

	public void testSetObject222() throws Fault 
	{
		java.sql.Date maxDateVal = null;
		String maxStringVal = null;
		String rStringVal = null;
		java.sql.Date rDateVal = null;

		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Varchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Value of Date from Date Table to be Updated in Null Column of Varchar Table 
			maxStringVal = rsSch.extractVal("Date_Tab",1,sqlp,conn);
			maxStringVal = maxStringVal.substring(maxStringVal.indexOf('\'')+1,maxStringVal.lastIndexOf('\''));
			maxDateVal = java.sql.Date.valueOf(maxStringVal);
			logMsg("String Value: " + maxStringVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxDateVal,java.sql.Types.VARCHAR);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			String Null_Val_Query = sqlp.getProperty("Varchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rStringVal = rs.getObject(1).toString();
			rStringVal = rStringVal.trim();
			logMsg("Returned String Value after Updation: " + rStringVal);  
			rDateVal = java.sql.Date.valueOf(rStringVal);
			logMsg("Returned String Value after Updation: " + rDateVal);  
			logMsg("Value returned from ctssql.stmt: " + maxDateVal);

			if(rDateVal.equals(maxDateVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}

		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Varchar_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/* cleanup */
	public void  cleanup() throws Fault
	{
		try
		{
			if(pstmt != null)
			{
				pstmt.close();
				pstmt = null;
			}
			if(stmt != null)
			{
				stmt.close();
				stmt = null;
			}
			// Close the database 
			rsSch.dbUnConnect(conn);
			logMsg("Cleanup ok;");
		}
		catch(Exception e)
		{
			logErr("An error occurred while closing the database connection");
		}
	}
}
