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

/*
 * @(#)prepStmtClient4.java	1.5 02/01/12
 */

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

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 prepStmtClient4 class tests methods of PreparedStatement interface using
 * Sun's J2EE Reference Implementation.
 * @author
 * @version 1.8, 11/24/00
 */

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

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

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

	/* Run test in standalone mode */
	public static void main(String[] args)
	{
		prepStmtClient4 theTests = new prepStmtClient4();
		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();
				props = p;
				/*String sqlStmt= p.getProperty("rsQuery","");
				InputStream istr= new FileInputStream(sqlStmt);
				sqlp.load(istr);*/
				sqlp = 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:         testSetObject10
	 * @assertion:        A Prepared Statement object provides a way of calling
	 *                    precompiled SQL4 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 with the maximum value of Integer_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 testSetObject10() throws Fault
	{
		Integer maxIntegerVal = null;
		Integer rIntegerVal = null;
		String smaxIntegerVal = null;

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

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

			//to extract the Maximum Value of Integer to be Updated
			smaxIntegerVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			maxIntegerVal=maxIntegerVal.valueOf(smaxIntegerVal);
			logMsg("Maximum Integer Value: " + maxIntegerVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxIntegerVal);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			String Min_Val_Query = sqlp.getProperty("Integer_Query_Min","");
			logMsg(Min_Val_Query);
			rs = stmt.executeQuery(Min_Val_Query);
			rs.next();
			
			Object orIntegerVal = rs.getObject(1);
				
			logMsg("Returned Integer Value after Updation: " + orIntegerVal);
			logMsg("Value returned from ctssql.stmt: " + maxIntegerVal);

			if(orIntegerVal.toString().trim().equals(smaxIntegerVal.trim()))
			{
				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("Integer_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject11
	 * @assertion:        A Prepared Statement object provides a way of calling
	 *                    precompiled SQL4 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 with the minimum value of Integer_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 testSetObject11() throws Fault
	{
		Integer minIntegerVal=null;
		Integer rIntegerVal = null;
		String sminIntegerVal = null;

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

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

			//to extract the Maximum Value of Integer to be Updated 
			sminIntegerVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			minIntegerVal=minIntegerVal.valueOf(sminIntegerVal);
			logMsg("Minimum Integer Value: " + minIntegerVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minIntegerVal);
			pstmt.executeUpdate();

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

			Object orIntegerVal = rs.getObject(1);
			logMsg("Returned Integer Value after Updation: " + orIntegerVal);
			logMsg("Value returned from ctssql.stmt: " + minIntegerVal);

			if(orIntegerVal.toString().trim().equals(sminIntegerVal.trim()))
			{
				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("Integer_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject12
	 * @assertion:        A Prepared Statement object provides a way of calling
	 *                    precompiled SQL4 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 with the maximum value of Bigint_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 testSetObject12() throws Fault
	{
		Long maxLongVal=null;
		Long rLongVal = null;
		String smaxLongVal = null;

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

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

			//to extract the Maximum Value of Long to be Updated 
			smaxLongVal = rsSch.extractVal("Bigint_Tab",1,sqlp,conn);
			maxLongVal=maxLongVal.valueOf(smaxLongVal);
			logMsg("Maximum Long Value: " + maxLongVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxLongVal);
			pstmt.executeUpdate();

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

			Object orLongVal =  rs.getObject(1);
			logMsg("Returned Long Value after Updation: " + orLongVal);
			logMsg("Value returned from ctssql.stmt: " + maxLongVal);

			if(orLongVal.toString().trim().equals(smaxLongVal.trim()))
			{
				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("Bigint_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject13
	 * @assertion:        A Prepared Statement object provides a way of calling
	 *                    precompiled SQL4 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 with the maximum value of Bigint_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 testSetObject13() throws Fault
	{
		Long  minLongVal=null;
		Long rLongVal = null;
		String sminLongVal = null;

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

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

			//to extract the Maximum Value of Long to be Updated
			sminLongVal = rsSch.extractVal("Bigint_Tab",2,sqlp,conn);
			minLongVal=minLongVal.valueOf(sminLongVal);
			logMsg("Minimum Long Value: " + minLongVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minLongVal);
			pstmt.executeUpdate();

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

			Object orLongVal =  rs.getObject(1);
			logMsg("Returned Long Value after Updation: " + orLongVal);
			logMsg("Value returned from ctssql.stmt: " + minLongVal);

			if(orLongVal.toString().trim().equals(sminLongVal.trim()))
			{
				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("Bigint_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject14
	 * @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 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 testSetObject14() throws Fault
	{
		Double maxDoubleVal = null;
		Double rDoubleVal = null;
		String smaxDoubleVal = 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);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxDoubleVal);
			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:         testSetObject15
	 * @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 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 testSetObject15() throws Fault
	{
		Double minDoubleVal = null;
		Double rDoubleVal = null;
		String sminDoubleVal = null;

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

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

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

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minDoubleVal);
			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:         testSetObject16
	 * @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 with the maximum value of Float_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 testSetObject16() throws Fault
	{
		Double maxDoubleVal = null;
		Double rDoubleVal = null;
		String smaxDoubleVal = null;

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

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

			//to extract the Maximum Value of Float to be Updated
			smaxDoubleVal = rsSch.extractVal("Float_Tab",1,sqlp,conn);
			maxDoubleVal = new Double(smaxDoubleVal);
			logMsg("Maximum Double Value: " + maxDoubleVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxDoubleVal);
			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("Float_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("Float_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject17
	 * @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 with the maximum value of Float_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 testSetObject17() throws Fault
	{
		Double minDoubleVal = null;
		Double rDoubleVal = null;
		String sminDoubleVal = null;

		try
		{

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

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

			//to extract the Maximum Value of Float to be Updated
			sminDoubleVal = rsSch.extractVal("Float_Tab",2,sqlp,conn);
			minDoubleVal = new Double(sminDoubleVal);
			logMsg("Minimum Double Value: " + minDoubleVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minDoubleVal);
			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();

			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("Float_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject18
	 * @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 with the Non Null value of Date_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the Non Null 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 testSetObject18() throws Fault
	{
		java.sql.Date mfgDateVal=null;
		String sMfgDateVal = null;
		java.sql.Date rDateVal = null;

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

			//to extract the Value of Date to be Updated
			sMfgDateVal = rsSch.extractVal("Date_Tab",1,sqlp,conn);
			sMfgDateVal = sMfgDateVal.substring(sMfgDateVal.indexOf('\'')+1,sMfgDateVal.lastIndexOf('\''));
			logMsg("Date Value: " + sMfgDateVal);

			// to convert String value into java.sql.Date value
			mfgDateVal = mfgDateVal.valueOf(sMfgDateVal);
			
			
			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,mfgDateVal);
			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("Date_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();
			
			java.util.Date urDateVal = (java.util.Date) rs.getObject(1);

			long ld = urDateVal.getTime();
			rDateVal= new java.sql.Date(ld);
			
			logMsg("Returned Date Value after Updation: " + rDateVal);
			logMsg("Value returned from ctssql.stmt: " + mfgDateVal);

			if(rDateVal.compareTo(mfgDateVal)==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("Date_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject19
	 * @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 with the Non Null value of Time_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the Non Null 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 testSetObject19() throws Fault
	{
		java.sql.Time brkTimeVal=null;
		String sBrkTimeVal = null;
		java.sql.Time rTimeVal = null;

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

			//to extract the Value of Time to be Updated
			sBrkTimeVal = rsSch.extractVal("Time_Tab",1,sqlp,conn);
			sBrkTimeVal = sBrkTimeVal.substring(sBrkTimeVal.indexOf('\'')+1,sBrkTimeVal.lastIndexOf('\''));
			logMsg("Time Value: " + sBrkTimeVal);

			// to convert String value into java.sql.Time value
			brkTimeVal = brkTimeVal.valueOf(sBrkTimeVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,brkTimeVal);
			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("Time_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();
			
			java.util.Date urTimeVal = (java.util.Date) rs.getObject(1);
			
			long lt = urTimeVal.getTime();
			rTimeVal = new java.sql.Time(lt);
			
			logMsg("Returned Time Value after Updation: " + rTimeVal);
			logMsg("Value returned from ctssql.stmt: " + brkTimeVal);

			if(rTimeVal.toString().trim().equals(brkTimeVal.toString().trim()))
			{
				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("Time_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject20
	 * @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 with the Non Null value of Timestamp_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the Non Null 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 testSetObject20() throws Fault
	{
		java.sql.Timestamp inTimeVal = null;
		String sInTimeVal = null;
		java.sql.Timestamp rTimestampVal = null;

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

			//to extract the Value of Timestamp to be Updated
			sInTimeVal = rsSch.extractVal("Timestamp_Tab",1,sqlp,conn);
			sInTimeVal = sInTimeVal.substring(sInTimeVal.indexOf('\'')+1,sInTimeVal.lastIndexOf('\''));
			logMsg("Timestamp Value: " + sInTimeVal);

			// to convert String value into java.sql.Timestamp
			inTimeVal = inTimeVal.valueOf(sInTimeVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,inTimeVal);
			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("Timestamp_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			rTimestampVal = (java.sql.Timestamp) rs.getObject(1);
			logMsg("Returned Timestamp Value after Updation:" + rTimestampVal);
			logMsg("Value returned from ctssql.stmt: " + inTimeVal);

			if(rTimestampVal.equals(inTimeVal))
			{
				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("Timestamp_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject21
	 * @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 with the maximum value of Real_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 testSetObject21() throws Fault
	{
		Float maxFloatVal=null;
		Float rFloatVal = null;
		String smaxFloatVal = null;

		try
		{
			// to create the Real Table
			rsSch.createTab("Real_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Real_Tab_Min_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Float to be Updated
			smaxFloatVal = rsSch.extractVal("Real_Tab",1,sqlp,conn);
			maxFloatVal=maxFloatVal.valueOf(smaxFloatVal);
			logMsg("Maximum Float Value: " + maxFloatVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxFloatVal);
			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("Real_Query_Min","");
			logMsg(Min_Val_Query);
			rs = stmt.executeQuery(Min_Val_Query);
			rs.next();

			Object orFloatVal =  rs.getObject(1);
			
			rFloatVal = new Float(orFloatVal.toString());
				
			logMsg("Returned Float Value after Updation: " + rFloatVal);
			logMsg("Value returned from ctssql.stmt: " + maxFloatVal);

			if(rFloatVal.equals(maxFloatVal))
			{
				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("Real_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject22
	 * @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 with the maximum value of Real_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 testSetObject22() throws Fault
	{
		Float minFloatVal=null;
		Float rFloatVal = null;
		String sminFloatVal = null;

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

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

			//to extract the Maximum Value of Float to be Updated
			sminFloatVal = rsSch.extractVal("Real_Tab",2,sqlp,conn);
			minFloatVal=minFloatVal.valueOf(sminFloatVal);
			logMsg("Minimum Float Value: " + minFloatVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minFloatVal);
			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("Real_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			Object orFloatVal =  rs.getObject(1);
			rFloatVal=new Float(orFloatVal.toString());
			
			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("Real_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject23
	 * @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 with the maximum value of Tinyint_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 testSetObject23() throws Fault
	{
		Integer maxTinyintVal=null;
		Integer rTinyintVal = null;
		String  smaxTinyintVal = null;

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

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

			//to extract the Maximum Value of Tinyint to be Updated
			smaxTinyintVal = rsSch.extractVal("Tinyint_Tab",1,sqlp,conn);
			maxTinyintVal=maxTinyintVal.valueOf(smaxTinyintVal);
			logMsg("Maximum Integer Value: " + maxTinyintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxTinyintVal);
			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("Tinyint_Query_Min","");
			logMsg(Min_Val_Query);
			rs = stmt.executeQuery(Min_Val_Query);
			rs.next();

			Object orTinyintVal = rs.getObject(1);
								
			logMsg("Returned Integer Value after Updation: " + orTinyintVal);
			logMsg("Value returned from ctssql.stmt: " + maxTinyintVal);

			if((orTinyintVal.toString().trim()).equals(smaxTinyintVal.trim()))
			{
				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("Tinyint_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject24
	 * @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 with the minimum value of Tinyint_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 testSetObject24() throws Fault
	{
		Integer minTinyintVal=null;
		Integer rTinyintVal = null;
		String sminTinyintVal = null;

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

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

			//to extract the Maximum Value of Tinyint to be Updated
			sminTinyintVal = rsSch.extractVal("Tinyint_Tab",2,sqlp,conn);
			minTinyintVal=minTinyintVal.valueOf(sminTinyintVal);
			logMsg("Minimum Integer Value: " + minTinyintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minTinyintVal);
			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("Tinyint_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			Object orTinyintVal =  rs.getObject(1);
			
			logMsg("Returned Integer Value after Updation: " + orTinyintVal);
			logMsg("Value returned from ctssql.stmt: " + minTinyintVal);

			if(orTinyintVal.toString().trim().equals(sminTinyintVal.trim()))
			{
				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("Tinyint_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject25
	 * @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 with the maximum value of Smallint_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 testSetObject25() throws Fault
	{
		Integer maxSmallintVal=null;
		Integer rSmallintVal = null;
		String smaxSmallintVal = null;

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

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

			//to extract the Maximum Value of Smallint to be Updated
			smaxSmallintVal = rsSch.extractVal("Smallint_Tab",1,sqlp,conn);
			maxSmallintVal=maxSmallintVal.valueOf(smaxSmallintVal);
			logMsg("Maximum Integer Value: " + maxSmallintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxSmallintVal);
			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("Smallint_Query_Min","");
			logMsg(Min_Val_Query);
			rs = stmt.executeQuery(Min_Val_Query);
			rs.next();

			Object orSmallintVal = rs.getObject(1);
			logMsg("Returned Integer Value after Updation: " + orSmallintVal);
			logMsg("Value returned from ctssql.stmt: " + maxSmallintVal);

			if((orSmallintVal.toString()).trim().equals((smaxSmallintVal.trim())))
			{
				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("Smallint_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject26
	 * @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 with the minimum value of Smallint_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 testSetObject26() throws Fault
	{
		Integer minSmallintVal=null;
		Integer rSmallintVal = null;
		String sminSmallintVal = null;

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

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

			//to extract the Maximum Value of Smallint to be Updated
			sminSmallintVal = rsSch.extractVal("Smallint_Tab",2,sqlp,conn);
			minSmallintVal=minSmallintVal.valueOf(sminSmallintVal);
			logMsg("Minimum Integer Value: " + minSmallintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minSmallintVal);
			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("Smallint_Query_Null","");
			logMsg(Null_Val_Query);
			rs = stmt.executeQuery(Null_Val_Query);
			rs.next();

			Object orSmallintVal =  rs.getObject(1);
			
			logMsg("Returned Integer Value after Updation: " + orSmallintVal);
			logMsg("Value returned from ctssql.stmt: " + minSmallintVal);

			if((orSmallintVal.toString()).trim().equals((sminSmallintVal.trim())))
			{
				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("Smallint_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject27
	 * @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.Update the column value of the Binary_Tab with a
	 *                    byte array using the PreparedStatement.setBytes(int columnIndex)
	 *                    method. Call the getObject(int parameterIndex) method.to retrieve
	 *                    the byte array. It should return the byte array object that has been set.
	 */



	public void testSetObject27() 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);
			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);
			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:         testSetObject28
	 * @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.Update the column value of the Varbinary_Tab with a
	 *                    byte array using the PreparedStatement.setBytes(int columnIndex)
	 *                    method. Call the getObject(int parameterIndex) method.to retrieve
	 *                    the byte array. It should return the byte array object that has been set.
	 */

	public void testSetObject28() 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);
			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);
			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:         testSetObject29
	 * @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.Update the column value of the Longvarbinary_Tab with a
	 *                    byte array using the PreparedStatement.setBytes(int columnIndex)
	 *                    method. Call the getObject(int parameterIndex) method to retrieve
	 *                    the byte array. It should return the byte array object that has been set.
	 */

	public void testSetObject29() 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);
			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){ }
		}
	}



	/* 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");
		}
	}
}
