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

/*
 * @(#)callStmtClient11.java	1.7 02/01/12
 */

package com.sun.cts.tests.jdbc.ee.callStmt.callStmt11;

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 callStmtClient11 class tests methods of CallableStatement interface (to check the
 * Support for IN, OUT and INOUT parameters of Stored Procedure) using
 * Sun's J2EE Reference Implementation.
 * @author
 * @version 1.7, 06/16/99
 */

public class callStmtClient11 extends ServiceEETest implements Serializable
{
	private static final String testName = "jdbc.ee.callStmt.callStmt11";

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

	//Harness requirements

	private transient Connection conn = null;
	private ResultSet rs=null;
	private rsSchema rsSch=null;
	private	String drManager=null;
	private Properties sqlp = null;
	private transient DatabaseMetaData dbmd=null;
	private Statement stmt=null;
	private	CallableStatement cstmt=null;
	private Properties props=null;

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


	/*
	 * @testName:         testSetObject61
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Smallint_Tab with the maximum value of the Smallint_Tab.
	 *                    Execute a query to retrieve the Min_Val from Smallint_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject61() throws Fault
	{
			
		Integer maxSmallintVal = null ;
		BigDecimal maxBigDecimalVal=null;
		String rSmallintVal=null;
		String smaxStringVal=null;
		try
		{

			// to create the Smallint Table
			rsSch.createTab("Smallint_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Smallint_In_Min(?)}");

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

			//setting the value
			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.SMALLINT);
			cstmt.executeUpdate();

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

			rSmallintVal="" + rs.getObject(1);
			logMsg("Returned Smallint Value after Updation:" + rSmallintVal);
			logMsg("Returned Smallint Value from ctssql.stmt:" + maxSmallintVal);

			if (rSmallintVal.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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Smallint_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject62
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Smallint_Tab with the minimum value of the Smallint_Tab.
	 *                    Execute a query to retrieve the Null_Val from Smallint_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject62() throws Fault
	{
		Integer minSmallintVal = null ;
		BigDecimal minBigDecimalVal=null;
		String rSmallintVal=null;
		String sminStringVal=null;
		try
		{

			rsSch.createTab("Smallint_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Smallint_In_Null(?)}");

			//to extract the Minimum Value of Smallint to be Updated
			sminStringVal = rsSch.extractVal("Smallint_Tab",2,sqlp,conn);

			minBigDecimalVal=new BigDecimal(sminStringVal);
			minSmallintVal = new Integer(sminStringVal);
			logMsg("Minimum Smallint Value :" + minSmallintVal);

			cstmt.setObject(1,minBigDecimalVal,java.sql.Types.SMALLINT);
			cstmt.executeUpdate();

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

			rSmallintVal= "" + rs.getObject(1);
			logMsg("Returned Smallint Value after Updation:" + rSmallintVal);
			logMsg("Returned Smallint Value from ctssql.stmt:" + minSmallintVal);

			if (rSmallintVal.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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Smallint_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject63
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Integer_Tab with the maximum value of the Integer_Tab.
	 *                    Execute a query to retrieve the Min_Val from Integer_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject63() throws Fault
	{

		Integer maxIntegerVal = null;
		BigDecimal maxBigDecimalVal=null;
		String rIntegerVal=null;
		String smaxStringVal=null;
		try
		{

			rsSch.createTab("Integer_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Integer_In_Min(?)}");

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

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.INTEGER);
			cstmt.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();

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

			if (rIntegerVal.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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Integer_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject64
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Integer_Tab with the minimum value of the Integer_Tab.
	 *                    Execute a query to retrieve the Null_Val from Integer_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject64() throws Fault
	{
		Integer minIntegerVal = null ;
		BigDecimal minBigDecimalVal=null;
		String rIntegerVal=null;
		String sminStringVal=null;
		try
		{

			rsSch.createTab("Integer_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Integer_In_Null(?)}");

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

			minBigDecimalVal=new BigDecimal(sminStringVal);
			minIntegerVal = new Integer(sminStringVal);
			logMsg("Minimum Smallint Value :" + minBigDecimalVal);

			cstmt.setObject(1,minBigDecimalVal,java.sql.Types.INTEGER);
			cstmt.executeUpdate();

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


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

			if (rIntegerVal.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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Integer_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject65
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Bigint_Tab with the maximum value of the Bigint_Tab.
	 *                    Execute a query to retrieve the Min_Val from Bigint_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject65() throws Fault
	{
		Long maxBigintVal = null ;
		BigDecimal maxBigDecimalVal=null;
		String rBigintVal=null;
		String smaxStringVal=null;
		try
		{

			rsSch.createTab("Bigint_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Bigint_In_Min(?)}");

			//to extract the Maximum Value of Bigint to be Updated
			smaxStringVal = rsSch.extractVal("Bigint_Tab",1,sqlp,conn);
			maxBigDecimalVal=new BigDecimal(smaxStringVal);
			maxBigintVal = new Long(smaxStringVal);
			logMsg("Minimum Bigint Value :" + maxBigintVal);

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.BIGINT);
			cstmt.executeUpdate();

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

			rBigintVal= "" + rs.getObject(1);
			logMsg("Returned Long Value after Updation:" + rBigintVal);
			logMsg("Returned Long Value from ctssql.stmt:" + maxBigintVal);

			if (rBigintVal.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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bigint_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject66
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Bigint_Tab with the minimum value of the Bigint_Tab.
	 *                    Execute a query to retrieve the Null_Val from Bigint_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject66() throws Fault
	{
		Long minBigintVal = null ;
		BigDecimal minBigDecimalVal=null;
		String rBigintVal=null;
		String sminStringVal=null;
		try
		{

			rsSch.createTab("Bigint_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Bigint_In_Null(?)}");

			//to extract the Minimum Value of Bigint to be Updated
			sminStringVal = rsSch.extractVal("Bigint_Tab",2,sqlp,conn);
			minBigDecimalVal=new BigDecimal(sminStringVal);
			minBigintVal = new Long(sminStringVal);
			logMsg("Minimum Smallint Value :" + minBigintVal);

			cstmt.setObject(1,minBigDecimalVal,java.sql.Types.BIGINT);
			cstmt.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();

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

			if (rBigintVal.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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bigint_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject67
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Real_Tab with the maximum value of the Real_Tab.
	 *                    Execute a query to retrieve the Min_Val from Real_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject67() throws Fault
	{
		Float maxRealVal = null ;
		BigDecimal maxBigDecimalVal=null;
		Float rRealVal = null;
		String smaxStringVal=null;
		try
		{

			rsSch.createTab("Real_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Real_In_Min(?)}");

			//to extract the Maximum Value of Integer to be Updated in Real table
			smaxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			logMsg("Extracted String Value :" + smaxStringVal);
			maxBigDecimalVal=new BigDecimal(smaxStringVal);
			logMsg("Value to be updated :" + maxBigDecimalVal);
			maxRealVal = new Float(smaxStringVal);
			logMsg("Minimum Real Value :" + maxRealVal);

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.REAL);
			cstmt.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 oRealVal= rs.getObject(1);
			rRealVal = new Float(oRealVal.toString());
			logMsg("Returned Real Value after Updation:" + rRealVal);
			logMsg("Returned Real Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Real_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject68
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Real_Tab with the minimum value of the Real_Tab.
	 *                    Execute a query to retrieve the Null_Val from Real_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject68() throws Fault
	{
		Float minRealVal = null ;
		BigDecimal minBigDecimalVal=null;
		Float  rRealVal=null;
		String sminStringVal=null;
		try
		{
			rsSch.createTab("Real_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Real_In_Null(?)}");

			//to extract the Minimum Value of Integer to be Updated in Real table
			sminStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			minBigDecimalVal=new BigDecimal(sminStringVal);
			minRealVal = new Float(sminStringVal);
			logMsg("Minimum Real Value :" + minRealVal);

			cstmt.setObject(1,minBigDecimalVal,java.sql.Types.REAL);
			cstmt.executeUpdate();

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

			Object oRealVal=  rs.getObject(1);
			
			rRealVal = new Float(oRealVal.toString());
			logMsg("Returned Real Value after Updation:" + rRealVal);
			logMsg("Returned Real Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Real_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject69
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Float_Tab with the maximum value of the Float_Tab.
	 *                    Execute a query to retrieve the Min_Val from Float_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal
	 */
	public void testSetObject69() throws Fault
	{
		Double maxFloatVal = null;
		BigDecimal maxBigDecimalVal=null;
		Double rFloatVal=null;
		String smaxStringVal=null;
		try
		{
			rsSch.createTab("Float_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Float_In_Min(?)}");
			//to extract the Maximum Value of Decimal to be Updated  in Float
			smaxStringVal = rsSch.extractVal("Decimal_Tab",1,sqlp,conn);

			maxBigDecimalVal=new BigDecimal(smaxStringVal);
			maxFloatVal = new Double(smaxStringVal);
			logMsg("Minimum Float Value :" + maxFloatVal);

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.FLOAT);
			cstmt.executeUpdate();

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

			rFloatVal= (Double) rs.getObject(1);
			logMsg("Returned Float Value after Updation:" + rFloatVal);
			logMsg("Returned Float Value after Updation:" + 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Float_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject70
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Float_Tab with the minimum value of the Float_Tab.
	 *                    Execute a query to retrieve the Null_Val from Float_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject70() throws Fault
	{
		Double minFloatVal = null ;
		BigDecimal minBigDecimalVal=null;
		Double rFloatVal=null;
		String sminStringVal=null;
		try
		{
			rsSch.createTab("Float_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Float_In_Null(?)}");

			//to extract the Minimum Value of Decimal to be Updated in Float table
			sminStringVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);
			minBigDecimalVal=new BigDecimal(sminStringVal);
			minFloatVal = new Double(sminStringVal);
			logMsg("Minimum Float Value :" + minFloatVal);

			cstmt.setObject(1,minBigDecimalVal,java.sql.Types.FLOAT);
			cstmt.executeUpdate();

			//to query from the database to check the call of cstmt.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("Returned Float Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Float_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject71
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Double_Tab with the maximum value of the Double_Tab.
	 *                    Execute a query to retrieve the Min_Val from Double_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject71() throws Fault
	{
		Double maxDoubleVal = null ;
		BigDecimal maxBigDecimalVal=null;
		Double rDoubleVal=null;
		String smaxStringVal=null;
		try
		{

			rsSch.createTab("Double_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Double_In_Min(?)}");

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

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.DOUBLE);
			cstmt.executeUpdate();

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

			rDoubleVal= (Double) rs.getObject(1);
			logMsg("Returned Double Value after Updation:" + rDoubleVal);
			logMsg("Returned Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Double_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject72
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Double_Tab with the minimum value of the Double_Tab.
	 *                    Execute a query to retrieve the Null_Val from Double_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject72() throws Fault
	{
		Double minDoubleVal = null ;
		BigDecimal minBigDecimalVal=null;
		Double rDoubleVal=null;
		String sminStringVal=null;
		try
		{

			rsSch.createTab("Double_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Double_In_Null(?)}");

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

			cstmt.setObject(1,minBigDecimalVal,java.sql.Types.DOUBLE);
			cstmt.executeUpdate();

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

			rDoubleVal= (Double) rs.getObject(1);
			logMsg("Returned Double Value after Updation:" + rDoubleVal);
			logMsg("Returned Double Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Double_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject73
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Decimal_Tab with the maximum value of the Decimal_Tab.
	 *                    Execute a query to retrieve the Null_Val from Decimal_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject73() throws Fault
	{
		BigDecimal maxDecimalVal = null ;
		BigDecimal rDecimalVal=null;
		String smaxStringVal=null;
		try
		{
			rsSch.createTab("Decimal_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Decimal_In_Null(?)}");

			//to extract the Maximum Value of Decimal to be Updated
			smaxStringVal = rsSch.extractVal("Decimal_Tab",1,sqlp,conn);
			maxDecimalVal = new BigDecimal(smaxStringVal);
			logMsg("Maximum Decimal Value :" + maxDecimalVal);

			cstmt.setObject(1,maxDecimalVal,java.sql.Types.DECIMAL,15);
			cstmt.executeUpdate();

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

			rDecimalVal= (BigDecimal) rs.getObject(1);
			logMsg("Returned Decimal Value after Updation:" + rDecimalVal);
			logMsg("Returned Decimal Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Decimal_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject74
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Decimal_Tab with the minimum value of the Decimal_Tab.
	 *                    Execute a query to retrieve the Null_Val from Decimal_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject74() throws Fault
	{
		BigDecimal minDecimalVal = null ;
		BigDecimal rDecimalVal=null;
		String sminStringVal=null;
		try
		{
			rsSch.createTab("Decimal_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Decimal_In_Max(?)}");

			//to extract the Minimum Value of Decimal to be Updated
			sminStringVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);
			minDecimalVal = new BigDecimal(sminStringVal);
			logMsg("Minimum Decimal Value :" + minDecimalVal);

			cstmt.setObject(1,minDecimalVal,java.sql.Types.DECIMAL,15);
			cstmt.executeUpdate();

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

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

			if ( (rDecimalVal.compareTo(minDecimalVal)==0) )
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Decimal_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject75
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Numeric_Tab with the maximum value of the Numeric_Tab.
	 *                    Execute a query to retrieve the Min_Val from Numeric_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject75() throws Fault
	{
		BigDecimal maxNumericVal = null ;
		BigDecimal rNumericVal=null;
		String smaxStringVal=null;
		try
		{

			rsSch.createTab("Numeric_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Numeric_In_Max(?)}");


			//to extract the Maximum Value of Numeric to be Updated
			smaxStringVal = rsSch.extractVal("Numeric_Tab",2,sqlp,conn);
			maxNumericVal = new BigDecimal(smaxStringVal);
			logMsg("Maximum Numeric Value :" + maxNumericVal);

			cstmt.setObject(1,maxNumericVal,java.sql.Types.NUMERIC,15);
			cstmt.executeUpdate();

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

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

			if ( (rNumericVal.compareTo(maxNumericVal)==0) )
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject76
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Numeric_Tab with the minimum value of the Numeric_Tab.
	 *                    Execute a query to retrieve the Null_Val from Numeric_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject76() throws Fault
	{
		BigDecimal minNumericVal = null ;
		BigDecimal rNumericVal=null;
		String sminStringVal=null;
		try
		{
			rsSch.createTab("Numeric_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Numeric_In_Null(?)}");

			//to extract the Maximum Value of Numeric to be Updated
			sminStringVal = rsSch.extractVal("Numeric_Tab",2,sqlp,conn);
			minNumericVal = new BigDecimal(sminStringVal);
			logMsg("Minimum Numeric Value :" + minNumericVal);

			cstmt.setObject(1,minNumericVal,java.sql.Types.NUMERIC,16);
			cstmt.executeUpdate();

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

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

			if ( (rNumericVal.compareTo(minNumericVal)==0) )
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject77
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Bit_Tab with the maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Min_Val from Bit_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject77() throws Fault
	{
		Boolean maxBooleanVal=null;
		Boolean rBooleanVal=null;
		String smaxBooleanVal=null;
		BigDecimal maxBigDecimalVal = null ;
		try
		{

			rsSch.createTab("Bit_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Bit_In_Min(?)}");

			//to extract the Maximum Value of Boolean to be Updated
			smaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			smaxBooleanVal = smaxBooleanVal.trim();
			//maxBigDecimalVal = new BigDecimal(smaxBooleanVal);
			
			maxBooleanVal=new Boolean(smaxBooleanVal);
			logMsg("Maximum Boolean Value :" + maxBooleanVal);

			cstmt.setObject(1,maxBooleanVal,java.sql.Types.BIT);
			cstmt.executeUpdate();

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

			rBooleanVal=(Boolean) rs.getObject(1);
			logMsg("Returned Boolean Value after Updation:" + rBooleanVal);
			logMsg("Returned Boolean Value after Updation:" + maxBooleanVal);

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


	/*
	 * @testName:         testSetObject78
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Bit_Tab with the minimum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Min_Val from Bit_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject78() throws Fault
	{
		Boolean minBooleanVal=null;
		Boolean rBooleanVal=null;
		String sminBooleanVal=null;
		BigDecimal minBigDecimalVal = null ;
		try
		{
			rsSch.createTab("Bit_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Bit_In_Null(?)}");

			//to extract the Minimum Value of Boolean to be Updated
			sminBooleanVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			sminBooleanVal = sminBooleanVal.trim();
			//minBigDecimalVal = new BigDecimal(sminBooleanVal);
			minBooleanVal=new Boolean(sminBooleanVal);
			logMsg("Minimum Boolean Value :" + minBooleanVal);

			cstmt.setObject(1,minBooleanVal,java.sql.Types.BIT);
			cstmt.executeUpdate();

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

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

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


	/*
	 * @testName:         testSetObject79
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Char_Tab with the maximum value of the Decimal_Tab.
	 *                    Execute a query to retrieve the Null_Val from Char_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject79() throws Fault
	{
		String maxStringVal=null;
		String rStringVal=null;
		BigDecimal maxBigDecimalVal = null ;
		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Char_In_Null(?)}");

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

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.CHAR);
			cstmt.executeUpdate();

			//to query from the database to check the call of cstmt.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();
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject80
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    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.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Char_Tab with the minimum value of the Decimal_Tab.
	 *                    Execute a query to retrieve the Null_Val from Char_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject80() throws Fault
	{
		String maxStringVal=null;
		String rStringVal=null;
		BigDecimal maxBigDecimalVal = null ;
		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Char_In_Null(?)}");

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

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.CHAR);
			cstmt.executeUpdate();

			//to query from the database to check the call of cstmt.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();
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value 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(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


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