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

/*
 * @(#)prepStmtClient8.java	1.6 02/01/12
 */

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

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 prepStmtClient8 class tests methods of PreparedStatement interface using
 * Sun's J2EE Reference Implementation.
 * @author
 * @version 1.7, 06/16/99
 */

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

	//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 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;
	private PreparedStatement pstmt = null;

	/* Run test in standalone mode */
	public static void main(String[] args)
	{
		prepStmtClient8 theTests = new prepStmtClient8();
		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:         testSetObject83
	 * @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 Char_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 testSetObject83() throws Fault
	{
		String maxStringVal = null;
		String rStringVal = null;
		BigDecimal maxBigDecimalVal = null;

		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);

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

			//to extract the Value of String to be Updated
			maxStringVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);
			maxBigDecimalVal = new BigDecimal(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

			rStringVal = rs.getObject(1).toString();
			rStringVal = rStringVal.trim();
			maxStringVal = maxStringVal.trim();
			logMsg("Returned String Value after Updation: " + rStringVal);
			logMsg("Value returned from ctssql.stmt: " + maxStringVal);

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

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



	/*
	 * @testName:         testSetObject84
	 * @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 Decimal_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject84() throws Fault
	{
		BigDecimal maxBigDecimalVal = null;
		String maxStringVal = null;
		String rStringVal = null;

		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);

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

			//to extract the Value of String to be Updated
			maxStringVal = rsSch.extractVal("Decimal_Tab",1,sqlp,conn);
			maxBigDecimalVal = new BigDecimal(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

			rStringVal = rs.getObject(1).toString();
			rStringVal = rStringVal.trim();
			maxStringVal = maxStringVal.trim();
			logMsg("Returned String Value after Updation: " + rStringVal);
			logMsg("Value returned from ctssql.stmt: " + maxStringVal);

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

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



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

	public void testSetObject85() throws Fault
	{
		BigDecimal maxBigDecimalVal = null;
		String maxStringVal = null;
		String rStringVal = null;

		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);

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

			//to extract the Value of String to be Updated
			maxStringVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);
			maxBigDecimalVal = new BigDecimal(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

			rStringVal = rs.getObject(1).toString();
			rStringVal = rStringVal.trim();
			maxStringVal = maxStringVal.trim();
			logMsg("Returned String Value after Updation: " + rStringVal);
			logMsg("Value returned from ctssql.stmt: " + maxStringVal);

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

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



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

	public void testSetObject86() throws Fault
	{
		String maxStringVal = null;
		BigDecimal maxBigDecimalVal = null;
		String rStringVal = null;
		try
		{
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);

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

			//to extract the Value of String to be Updated
			maxStringVal = rsSch.extractVal("Decimal_Tab",1,sqlp,conn);
			maxBigDecimalVal = new BigDecimal(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

			rStringVal = rs.getObject(1).toString();
			rStringVal = rStringVal.trim();
			maxStringVal = maxStringVal.trim();
			logMsg("Returned String Value after Updation: " + rStringVal);
			logMsg("Value returned from ctssql.stmt: " + maxStringVal);

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

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



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

	public void testSetObject87() throws Fault
	{
		String maxStringVal = null;
		BigDecimal maxBigDecimalVal = null;
		String rStringVal = null;
		try
		{
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);

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

			//to extract the Value of String to be Updated
			maxStringVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);
			maxBigDecimalVal = new BigDecimal(maxStringVal);
			logMsg("String Value: " + maxBigDecimalVal);

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

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

			rStringVal = rs.getObject(1).toString();
			rStringVal = rStringVal.trim();
			maxStringVal = maxStringVal.trim();
			logMsg("Returned String Value after Updation: " + rStringVal);
			logMsg("Value returned from ctssql.stmt: " + maxStringVal);

			if(rStringVal.equals(maxStringVal))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception: " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch(Exception e)
		{
			logErr("Unexpected Exception: " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					 rs.close();
					 rs = null;
				}
				if(pstmt != null)
				{
					 pstmt.close();
					 pstmt = null;
				}
				if(stmt != null)
				{
					 stmt.close();
					 stmt = null;
				}
				rsSch.dropTab("Longvarcharnull_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



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

	public void testSetObject88() throws Fault
	{
		Boolean oMaxTinyintVal = null;
		Integer rTinyintVal = null;
		String smaxTinyintVal = null;
		Integer maxTinyintVal = null;
		boolean booleanVal;

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

			// to update Minimum value column with maximum
			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("Bit_Tab",1,sqlp,conn);

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

			logMsg("Maximum Boolean Value :" + oMaxTinyintVal);
			maxTinyintVal = new Integer(smaxTinyintVal);
			logMsg("Maximum Tinyint Value: " + maxTinyintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxTinyintVal,java.sql.Types.TINYINT);
			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);
			rTinyintVal = new Integer(orTinyintVal.toString());
			
			logMsg("Returned Tinyint Value after Updation: " + rTinyintVal);
			logMsg("Value returned from ctssql.stmt: " + maxTinyintVal);

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

	public void testSetObject89() throws Fault
	{
		Boolean oMinTinyintVal = null;
		Integer rTinyintVal = null;
		String sminTinyintVal = null;
		Integer minTinyintVal = null;
		boolean booleanVal;

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

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

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

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

			logMsg("Minimum Boolean Value :" + oMinTinyintVal);
			minTinyintVal = new Integer(sminTinyintVal);
			logMsg("Minimum Tinyint Value: " + minTinyintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinTinyintVal,java.sql.Types.TINYINT);
			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);
			rTinyintVal = new Integer(orTinyintVal.toString());
			
			logMsg("Returned Tinyint Value after Updation: " + rTinyintVal);
			logMsg("Value returned from ctssql.stmt: " + minTinyintVal);

			if (rTinyintVal.equals(minTinyintVal))
			{
				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:         testSetObject90
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object.
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Min_Val of Smallint_Tab with the maximum (true) value of Bit_Tab. Call the 
	 *                    getObject(int columnno) method to retrieve this value. Extract 
	 *                    the maximum (true) 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 testSetObject90() throws Fault
	{
		Boolean oMaxSmallintVal = null;
		Integer rSmallintVal = null;
		String smaxSmallintVal = null;
		Integer maxSmallintVal = null;
		boolean booleanVal;

		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 Boolean to be Updated in Smallint table
			smaxSmallintVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);

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

			maxSmallintVal = new Integer(smaxSmallintVal);
			logMsg("Maximum Smallint Value: " + oMaxSmallintVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxSmallintVal,java.sql.Types.SMALLINT);
			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);
			rSmallintVal = new Integer(orSmallintVal.toString());
			
			logMsg("Returned Smallint Value after Updation: " + rSmallintVal);
			logMsg("Value returned from ctssql.stmt: " + maxSmallintVal);

			if(rSmallintVal.equals(maxSmallintVal))
			{
				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:         testSetObject91
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition) 
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Null_Val of Smallint_Tab with the minimum (false) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the minimum (false) 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 testSetObject91() throws Fault
	{
		Boolean oMinSmallintVal = null;
		Integer rSmallintVal = null;
		String sminSmallintVal = null;
		Integer minSmallintVal = null;
		boolean booleanVal;

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

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

			//to extract the Minimum Value of Boolean to be Updated in Smallint table
			sminSmallintVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);

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

			minSmallintVal = new Integer(sminSmallintVal);
			logMsg("Minimum Smallint Value: " + minSmallintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinSmallintVal,java.sql.Types.SMALLINT);
			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);
			rSmallintVal = new Integer(orSmallintVal.toString());
			
			logMsg("Returned Smallint Value after Updation: " + rSmallintVal);
			logMsg("Value returned from ctssql.stmt: " + minSmallintVal);

			if(rSmallintVal.equals(minSmallintVal))
			{
				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:         testSetObject92
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition) 
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object.
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database.
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Min_Val of Integer_Tab with the maximum (true) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the maximum (true) 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 testSetObject92() throws Fault
	{
		Boolean oMaxIntegerVal = null;
		Integer rIntegerVal = null;
		String smaxIntegerVal = null;
		Integer maxIntegerVal = null;
		boolean booleanVal;

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

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

			//to extract the Maximum Value of Boolean to be Updated in Integer table
			smaxIntegerVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);

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

			maxIntegerVal = new Integer(smaxIntegerVal);
			logMsg("Maximum Integer Value: " + maxIntegerVal);

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

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

			if(rIntegerVal.equals(maxIntegerVal))
			{
				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:         testSetObject93
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Null_Val of Smallint_Tab with the minimum (false) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the minimum (false) 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 testSetObject93() throws Fault
	{
		Boolean oMinIntegerVal = null;
		Integer rIntegerVal = null;
		String sminIntegerVal = null;
		Integer minIntegerVal = null;
		boolean booleanVal;

		try
		{

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

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

			//to extract the Minimum Value of Boolean to be Updated in Integer table
			sminIntegerVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);

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

			minIntegerVal = new Integer(sminIntegerVal);
			logMsg("Minimum Integer Value: " + minIntegerVal);

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

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

			if(rIntegerVal.equals(minIntegerVal))
			{
				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:         testSetObject94
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object.
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Min_Val of Bigint_Tab with the maximum (true) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the maximum (true) 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 testSetObject94() throws Fault
	{
		Boolean oMaxBigintVal = null;
		Long rBigintVal = null;
		String smaxBigintVal = null;
		Long maxBigintVal = null;
		boolean booleanVal;

		try
		{

			// to create the Long 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 Boolean to be Updated in Bigint table
			smaxBigintVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);

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

			maxBigintVal = new Long(smaxBigintVal);
			logMsg("Maximum Long Value: " + maxBigintVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxBigintVal,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);
			rBigintVal = new Long(orBigintVal.toString());
			
			logMsg("Returned Long Value after Updation: " + rBigintVal);
			logMsg("Value returned from ctssql.stmt: " + maxBigintVal);

			if(rBigintVal.equals(maxBigintVal))
			{
				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:         testSetObject95
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Min_Val of Bigint_Tab with the minimum (false) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the minimum (false) 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 testSetObject95() throws Fault
	{
		Boolean oMinBigintVal = null;
		Long rBigintVal = null;
		String sminBigintVal = null;
		Long minBigintVal = null;
		boolean booleanVal;

		try
		{

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

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

			//to extract the Minimum Value of Boolean to be Updated in Bigint table
			sminBigintVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);

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

			minBigintVal = new Long(sminBigintVal);
			logMsg("Minimum Long Value: " + oMinBigintVal);

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

			if(rBigintVal.equals(minBigintVal))
			{
				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:         testSetObject96
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Min_Val of Real_Tab with the maximum (true) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the maximum (true) 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 testSetObject96() throws Fault
	{
		Boolean oMaxRealVal = null;
		Float rRealVal = null;
		String smaxRealVal = null;
		Float maxRealVal = null;
		boolean booleanVal;

		try
		{

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

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

			//to extract the Maximum Value of Boolean to be Updated in Real table
			smaxRealVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);

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

			maxRealVal = new Float(smaxRealVal);
			logMsg("Maximum Long Value: " + maxRealVal);

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMaxRealVal,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 Float Value after Updation: " + rRealVal);
			logMsg("Value returned from ctssql.stmt: " + maxRealVal);

			if(rRealVal.compareTo(maxRealVal)==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("Real_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



	/*
	 * @testName:         testSetObject97
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Null_Val of Smallint_Tab with the minimum (false) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the minimum (false) 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 testSetObject97() throws Fault
	{
		Boolean oMinRealVal = null;
		Float rRealVal = null;
		String sminRealVal = null;
		Float minRealVal = null;
		boolean booleanVal;

		try
		{

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

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

			//to extract the Minimum Value of Boolean to be Updated in Real table
			sminRealVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);

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

			minRealVal = new Float(sminRealVal);
			logMsg("Minimum Long Value: " + oMinRealVal.toString());

			// get the PreparedStatement object
			pstmt = conn.prepareStatement(sPrepStmt);
			pstmt.setObject(1,oMinRealVal,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 Float Value after Updation: " + rRealVal);
			logMsg("Value returned from ctssql.stmt: " + minRealVal);

			if(rRealVal.compareTo(minRealVal)==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("Real_Tab",conn);
			}
			catch(Exception e){ }
		}
	}



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

		try
		{
			// to create the Float 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 Boolean to be Updated in Float table
			smaxFloatVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);

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

			maxFloatVal = new Double(smaxFloatVal);
			logMsg("Maximum Float Value: " + maxFloatVal);

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

			rFloatVal = (Double)rs.getObject(1);
			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:         testSetObject99
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Null_Val of Float_Tab with the minimum (true) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the minimum (true) 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 testSetObject99() throws Fault
	{
		Boolean oMinFloatVal = null;
		Double rFloatVal = null;
		String sminFloatVal = null;
		Double minFloatVal = null;
		boolean booleanVal;

		try
		{

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

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

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

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

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

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

			//to query from the database to check the call of pstmt.executeUpdate
			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:         testSetObject100
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Min_Val of Double_Tab with the maximum (true) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the maximum (true) 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 testSetObject100() throws Fault
	{
		Boolean oMaxDoubleVal = null;
		Double rDoubleVal = null;
		String smaxDoubleVal = null;
		Double maxDoubleVal = null;
		boolean booleanVal;

		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 Boolean to be Updated in Double table
			smaxDoubleVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);

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

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

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



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

		try
		{

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

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

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

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

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

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

			//to query from the database to check the call of pstmt.executeUpdate
			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:         testSetObject102
	 * @assertion:        A Prepared Statement object provides a way of calling 
	 *                    precompiled SQL statements.It can take one or more parameters 
	 *                    as input arguments(IN parameters). (See section 11.1.6 of 
	 *                    JDBC 2.0 API Reference & Tutorial,Second Edition)
	 *
	 *                    The drivers must provide full support for Prepared Statement 
	 *                    methods. (See section 6.2.2.3 of Java2 Platform Enterprise 
	 *                    Edition(J2EE) specification v 1.2).
	 *
	 *                    The setObject(int parameterIndex, Object x) method sets the 
	 *                    value of the designated parameter using the given object. 
	 *                    The second parameter must be of type Object; therefore, the 
	 *                    java.lang equivalent objects should be used for built-in types. 
	 *
	 *                    The JDBC specification specifies a standard mapping from Java 
	 *                    Object types to SQL types. The given argument will be converted 
	 *                    to the corresponding SQL type before being sent to the database. 
	 *
	 * @test_Strategy:    Get a PreparedStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x) method,update the 
	 *                    column Null_Val of Decimal_Tab with the maximum (true) value of 
	 *                    Bit_Tab. Call the getObject(int columnno) method to retrieve this 
	 *                    value. Extract the maximum (true) 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 testSetObject102() throws Fault
	{
		Boolean oMaxDecimalVal = null;
		BigDecimal rDecimalVal = null;
		String smaxDecimalVal = null;
		BigDecimal maxDecimalVal = null;
		boolean booleanVal;

		try
		{

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

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

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

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

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

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

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

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

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

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



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