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

/*
 * @(#)prepStmtClient5.java	1.8 02/01/12
 */

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

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

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

	//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 String drManager = null;
	private Properties sqlp = null;
	private Properties props = null;

	/* Run test in standalone mode */
	public static void main(String[] args)
	{
		prepStmtClient5 theTests = new prepStmtClient5();
		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();
			}
			catch(SQLException ex)
			{
				logErr("SQL Exception: : " + ex.getMessage());
			}
		}
		catch(Exception e)
		{
			logErr("Setup Failed!");
			TestUtil.printStackTrace(e);
		}
	}



	/*
	 * @testName:         testSetNull12
	 * @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 setNull(int parameterIndex, int sqlType) method sets the
	 *                    designated parameter to SQL NULL(the generic SQL NULL defined in
	 *                    java.sql.Types). Note that the JDBC type of the parameter to be
	 *                    set to JDBC NULL must be specified.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    execute the precompiled SQL Statement to set the value as SQL Null
	 *                    for Varchar Type and retrieve the same value by executing a query. Call
	 *                    the ResultSet.wasNull() method to check it. It should return a true value.
	 *
	 */

	public void testSetNull12() throws Fault
	{
		boolean nullFlag;
		String rStringVal = null;

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

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setNull(1,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 = rs.getString(1);
			nullFlag = rs.wasNull();
			logMsg("Boolean Value After Updation: " + nullFlag);

			if(nullFlag)
			{
				logMsg("setNull Method sets the designated parameter to a SQL Null");
			}
			else
			{
				logErr("setNull Method does not set the designated parameter to a SQL Null ");
				throw new Fault("Call to setNull Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setNull is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setNull 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:         testSetNull13
	 * @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 setNull(int parameterIndex, int sqlType) method sets the
	 *                    designated parameter to SQL NULL(the generic SQL NULL defined in
	 *                    java.sql.Types). Note that the JDBC type of the parameter to be
	 *                    set to JDBC NULL must be specified.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    execute the precompiled SQL Statement to set the value as SQL Null
	 *                    for LONGVARCHAR Type and retrieve the same value by executing a query. Call
	 *                    the ResultSet.wasNull() method to check it. It should return a true value.
	 *
	 */

	public void testSetNull13() throws Fault
	{
		boolean nullFlag;
		String rStringVal = null;

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

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setNull(1,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 = rs.getString(1);
			nullFlag = rs.wasNull();
			logMsg("Boolean Value After Updation: " + nullFlag);

			if(nullFlag)
			{
				logMsg("setNull Method sets the designated parameter to a SQL Null");
			}
			else
			{
				logErr("setNull Method does not set the designated parameter to a SQL Null ");
				throw new Fault("Call to setNull Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setNull is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setNull 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:         testSetNull14
	 * @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 setNull(int parameterIndex, int sqlType) method sets the
	 *                    designated parameter to SQL NULL(the generic SQL NULL defined in
	 *                    java.sql.Types). Note that the JDBC type of the parameter to be
	 *                    set to JDBC NULL must be specified.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    execute the precompiled SQL Statement to set the value as SQL Null
	 *                    for REAL Type and retrieve the same value by executing a query. Call
	 *                    the ResultSet.wasNull() method to check it. It should return a true value.
	 *
	 */

	public void testSetNull14() throws Fault
	{
		boolean nullFlag;
		float rFloatVal = 0;

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

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setNull(1,java.sql.Types.REAL);
			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();

			rFloatVal = rs.getFloat(1);
			nullFlag = rs.wasNull();
			logMsg("Boolean Value After Updation: " + nullFlag);

			if(nullFlag)
			{
				logMsg("setNull Method sets the designated parameter to a SQL Null");
			}
			else
			{
				logErr("setNull Method does not set the designated parameter to a SQL Null ");
				throw new Fault("Call to setNull Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setNull is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setNull 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:         testSetNull15
	 * @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 setNull(int parameterIndex, int sqlType) method sets the
	 *                    designated parameter to SQL NULL(the generic SQL NULL defined in
	 *                    java.sql.Types). Note that the JDBC type of the parameter to be
	 *                    set to JDBC NULL must be specified.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    execute the precompiled SQL Statement to set the value as SQL Null
	 *                    for DECIMAL Type and retrieve the same value by executing a query. Call
	 *                    the ResultSet.wasNull() method to check it. It should return a true value.
	 *
	 */

	public void testSetNull15() throws Fault
	{
		boolean nullFlag;
		BigDecimal rBigDecimalVal = null;

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

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setNull(1,java.sql.Types.DECIMAL);
			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();

			rBigDecimalVal = rs.getBigDecimal(1);
			nullFlag = rs.wasNull();
			logMsg("Boolean Value After Updation " + nullFlag);

			if(nullFlag)
			{
				logMsg("setNull Method sets the designated parameter to a SQL Null");
			}
			else
			{
				logErr("setNull Method does not set the designated parameter to a SQL Null ");
				throw new Fault("Call to setNull Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setNull is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setNull 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:         testSetNull16
	 * @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 setNull(int parameterIndex, int sqlType) method sets the
	 *                    designated parameter to SQL NULL(the generic SQL NULL defined in
	 *                    java.sql.Types). Note that the JDBC type of the parameter to be
	 *                    set to JDBC NULL must be specified.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    execute the precompiled SQL Statement to set the value as SQL Null
	 *                    for BINARY Type and retrieve the same value by executing a query. Call
	 *                    the ResultSet.wasNull() method to check it. It should return a true value.
	 *
	 */



	public void testSetNull16() 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.setBytes(1,bytearr);
			pstmt.executeUpdate();

			// to update the Column with the Null
			pstmt.setNull(1,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.getBytes(1);

			if(retByteArr == null)
			{
				logMsg("setNull Method sets the designated parameter to a SQL Null ");
			}
			else
			{
				logErr("setNull Method does not set the designated parameter to a SQL Null ");
				throw new Fault("Call to setNull Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setNull is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setNull 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:         testSetNull17
	 * @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 setNull(int parameterIndex, int sqlType) method sets the
	 *                    designated parameter to SQL NULL(the generic SQL NULL defined in
	 *                    java.sql.Types). Note that the JDBC type of the parameter to be
	 *                    set to JDBC NULL must be specified.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    execute the precompiled SQL Statement to set the value as SQL Null
	 *                    for VARBINARY Type and retrieve the same value by executing a query. Call
	 *                    the ResultSet.wasNull() method to check it. It should return a true value.
	 *
	 */

	public void testSetNull17() 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.setBytes(1,bytearr);
			pstmt.executeUpdate();

			// to update the Column with the Null
			pstmt.setNull(1,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.getBytes(1);

			if(retByteArr == null)
			{
				logMsg("setNull Method sets the designated parameter to a SQL Null ");
			}
			else
			{
				logErr("setNull Method does not set the designated parameter to a SQL Null ");
				throw new Fault("Call to setNull Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setNull is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setNull 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:         testSetNull18
	 * @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 setNull(int parameterIndex, int sqlType) method sets the
	 *                    designated parameter to SQL NULL(the generic SQL NULL defined in
	 *                    java.sql.Types). Note that the JDBC type of the parameter to be
	 *                    set to JDBC NULL must be specified.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    execute the precompiled SQL Statement to set the value as SQL Null
	 *                    for LONGVARBINARY Type and retrieve the same value by executing a query. Call
	 *                    the ResultSet.wasNull() method to check it. It should return a true value.
	 *
	 */

	public void testSetNull18() throws Fault
	{
		byte retByteArr[] = null;
		boolean byteArrFlag = false;

		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.setBytes(1,bytearr);
			pstmt.executeUpdate();

			// to set the Longvarbinary Column as SQL Null
			pstmt.setNull(1,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 = rs.getBytes(1);

			if(retByteArr == null)
			{
				logMsg("setNull Method sets the designated parameter to a SQL Null ");
			}
			else
			{
				logErr("setNull Method does not set the designated parameter to a SQL Null ");
				throw new Fault("Call to setNull Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setNull is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setNull 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:         testSetObject30
	 * @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 testSetObject30() throws Fault
	{
		Integer maxTinyintVal = null;
		String maxStringVal = null;
		Integer rTinyintVal = null;
		String smaxStringVal = null;

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

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

			//to extract the Maximum Value of Tinyint to be Updated 
			smaxStringVal = rsSch.extractVal("Tinyint_Tab",1,sqlp,conn);

			maxStringVal = new String(smaxStringVal);
			maxTinyintVal = new Integer(smaxStringVal);
			logMsg("Maximum Tinyint Value to be updated: " + maxTinyintVal);

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

			//to query from the database to check the call of pstmt.executeUpdate
			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(smaxStringVal.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:         testSetObject31
	 * @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 testSetObject31() throws Fault
	{
		Integer minTinyintVal = null;
		String minStringVal = null;
		Integer rTinyintVal = null;
		String sminStringVal = 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 Minimum Value of Tinyint to be Updated 
			sminStringVal = rsSch.extractVal("Tinyint_Tab",2,sqlp,conn);

			minStringVal = new String(sminStringVal);
			minTinyintVal = new Integer(minStringVal);
			logMsg("Minimum Tinyint Value to be updated: " + minTinyintVal);
			
			//get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minStringVal,java.sql.Types.TINYINT);
			pstmt.executeUpdate();

			//to query from the database to check the call of pstmt.executeUpdate
			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(sminStringVal.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:         testSetObject32
	 * @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 testSetObject32() throws Fault
	{
		Integer maxSmallintVal = null;
		String maxStringVal = null;
		Integer rSmallintVal = null;
		String smaxStringVal = null;

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

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

			//to extract the Maximum Value of Smallint to be Updated 
			smaxStringVal = rsSch.extractVal("Smallint_Tab",1,sqlp,conn);

			maxStringVal = new String(smaxStringVal);
			maxSmallintVal = new Integer(smaxStringVal);
			logMsg("Maximum Smallint Value to be updated: " + maxSmallintVal);

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

			//to query from the database to check the call of pstmt.executeUpdate
			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 Smallint Value after Updation:" + orSmallintVal);
			logMsg("Value returned from ctssql.stmt: " + maxSmallintVal);

			if (orSmallintVal.toString().trim().equals(smaxStringVal.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:         testSetObject33
	 * @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 testSetObject33() throws Fault 
	{
		Integer minSmallintVal = null;
		String minStringVal = null;
		Integer rSmallintVal = null;
		String sminStringVal = 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 Minimum Value of Smallint to be Updated 
			sminStringVal = rsSch.extractVal("Smallint_Tab",2,sqlp,conn);

			minStringVal = new String(sminStringVal);
			minSmallintVal = new Integer(sminStringVal);
			logMsg("Minimum Smallint Value to be updated: " + minSmallintVal);

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

			//to query from the database to check the call of pstmt.executeUpdate
			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 Smallint Value after Updation: " + orSmallintVal);
			logMsg("Value returned from ctssql.stmt: " + minSmallintVal);

			if(orSmallintVal.toString().trim().equals(sminStringVal.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:         testSetObject34
	 * @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 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 testSetObject34() throws Fault 
	{
		
		Integer maxIntegerVal = null;
		String maxStringVal = null;
		Integer rIntegerVal = null;
		String smaxStringVal = null;

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

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

			//to extract the Maximum Value of Integer to be Updated 
			smaxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);

			maxStringVal = new String(smaxStringVal);
			maxIntegerVal = new Integer(smaxStringVal);
			logMsg("Maximum Integer Value to be updated: " + maxStringVal);

			//get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxStringVal,java.sql.Types.INTEGER);
			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(smaxStringVal.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:         testSetObject35
	 * @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 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 testSetObject35() throws Fault 
	{
		Integer minIntegerVal = null;
		String minStringVal = null;
		Integer rIntegerVal = null;
		String sminStringVal = 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 Minimum Value of Integer to be Updated 
			sminStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);

			minStringVal = new String(sminStringVal);
			minIntegerVal = new Integer(sminStringVal);
			logMsg("Minimum Integer Value to be updated: " + minStringVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,minStringVal,java.sql.Types.INTEGER);
			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(sminStringVal.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:         testSetObject36
	 * @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 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 testSetObject36() throws Fault 
	{
		Long maxBigintVal = null;
		String maxStringVal = null;
		Long rBigintVal = null;
		String smaxStringVal = null;

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

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

			//to extract the Maximum Value of Bigint to be Updated 
			smaxStringVal = rsSch.extractVal("Bigint_Tab",1,sqlp,conn);

			maxStringVal = new String(smaxStringVal);
			maxBigintVal = new Long(smaxStringVal);
			logMsg("Maximum Long Value to be updated: " + maxBigintVal);

			//get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,maxStringVal,java.sql.Types.BIGINT);
			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 orBigintVal =  rs.getObject(1);
			logMsg("Returned Long Value after Updation: " + orBigintVal);
			logMsg("Value returned from ctssql.stmt: " + maxBigintVal);

			if(orBigintVal.toString().trim().equals(smaxStringVal))
			{
				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:         testSetObject37
	 * @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 Bigint_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 testSetObject37() throws Fault 
	{
		Long minBigintVal = null;
		String minStringVal = null;
		Long rBigintVal = null;
		String sminStringVal = 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 Minimum Value of Bigint to be Updated 
			sminStringVal = rsSch.extractVal("Bigint_Tab",2,sqlp,conn);

			minStringVal = new String(sminStringVal);
			minBigintVal = new Long(sminStringVal);
			logMsg("Minimum Long Value to be updated: " + minBigintVal);

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

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

			if(orBigintVal.toString().trim().equals(sminStringVal.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:         testSetObject38
	 * @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 testSetObject38() throws Fault 
	{
		Float maxRealVal = null;
		String maxStringVal = null;
		Float rRealVal = null;
		String smaxStringVal = null;

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

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

			//to extract the Maximum Value of Real to be Updated 
			smaxStringVal = rsSch.extractVal("Real_Tab",1,sqlp,conn);

			maxStringVal = new String(smaxStringVal);
			maxRealVal = new Float(smaxStringVal);
			logMsg("Maximum Real Value to be updated: " + maxRealVal);

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

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

			Object orRealVal =  rs.getObject(1);
			rRealVal = new Float(orRealVal.toString());
			
			logMsg("Returned Real Value after Updation: " + rRealVal);
			logMsg("Value returned from ctssql.stmt: " + maxRealVal);

			if(rRealVal.equals(maxRealVal))
			{
				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:         testSetObject39
	 * @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 Real_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 testSetObject39() throws Fault 
	{
		Float minRealVal = null;
		String minStringVal = null;
		Float  rRealVal = null;
		String sminStringVal = 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 Minimum Value of Real to be Updated 
			sminStringVal = rsSch.extractVal("Real_Tab",2,sqlp,conn);

			minStringVal = new String(sminStringVal);
			minRealVal = new Float(sminStringVal);
			logMsg("Minimum Real Value to be updated: " + minRealVal);

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

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

			Object orRealVal =  rs.getObject(1);
			rRealVal = new Float(orRealVal.toString());
			
			logMsg("Returned Real Value after Updation: " + rRealVal);
			logMsg("Value returned from ctssql.stmt: " + minRealVal);

			if(rRealVal.equals(minRealVal))
			{
				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:         testSetObject40
	 * @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 testSetObject40() throws Fault
	{
		Double maxFloatVal = null ;
		String maxStringVal = null;
		Double rFloatVal = null;
		String smaxStringVal = null;

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

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

			//to extract the Maximum Value of Float to be Updated 
			smaxStringVal = rsSch.extractVal("Float_Tab",1,sqlp,conn);

			maxStringVal = new String(smaxStringVal);
			maxFloatVal = new Double(smaxStringVal);
			logMsg("Maximum Float Value to be updated: " + maxStringVal);

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

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

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



	/*
	 * @testName:         testSetObject41
	 * @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 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 testSetObject41() throws Fault
	{
		Double minFloatVal = null;
		String minStringVal = null;
		Double rFloatVal = null;
		String sminStringVal = null;

		try
		{
			//to create the Float 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 Minimum Value of Float to be Updated 
			sminStringVal = rsSch.extractVal("Float_Tab",2,sqlp,conn);

			minStringVal = new String(sminStringVal);
			minFloatVal = new Double(sminStringVal);
			logMsg("Minimum Float Value to be updated: " + minFloatVal);

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

			//to query from the database to check the call of pstmt.executeUpdate
			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:         testSetObject42
	 * @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 testSetObject42() throws Fault 
	{
		Double maxDoubleVal = null ;
		String maxStringVal = null;
		Double rDoubleVal = null;
		String smaxStringVal = null;

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

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

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

			maxStringVal = new String(smaxStringVal);
			maxDoubleVal = new Double(smaxStringVal);
			logMsg("Maximum Double Value to be updated:" + maxDoubleVal);

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

			//to query from the database to check the call of pstmt.executeUpdate
			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){ }
		}
	}



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