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

/*
 * @(#)callStmtClient13.java	1.10 02/01/12
 */

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

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 callStmtClient13 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 callStmtClient13 extends ServiceEETest implements Serializable
{
	private static final String testName = "jdbc.ee.callStmt.callStmt13";

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

	//Harness requirements

	private transient Connection conn = null;
	private ResultSet rs=null;
	private csSchema csSch=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)
	{
		callStmtClient13 theTests = new callStmtClient13();
		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();
				csSch = new csSchema();
			}
			catch(SQLException ex)
			{
				logErr("SQL Exception : " + ex.getMessage());
			}
		}
		catch  ( Exception e )
		{
			logErr("Setup Failed!");
			TestUtil.printStackTrace(e);
		}
	}


	/*
	 * @testName:         testSetObject101
	 * @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 maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_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 testSetObject101() throws Fault
	{
		Boolean oMaxNumericVal=null;
		BigDecimal rNumericVal=null;
		String smaxNumericVal=null;
		BigDecimal maxNumericVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Maximum Value of Boolean to be Updated in Numeric Table
			smaxNumericVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMaxNumericVal= new Boolean(smaxNumericVal);
				if(smaxNumericVal.equalsIgnoreCase("true"))
				{
					smaxNumericVal="1";
				}
				else
				{
					smaxNumericVal="0";
				}
			}
			else
			{
				booleanVal= (smaxNumericVal.trim().equals("1"))? true : false;
				oMaxNumericVal=new Boolean(booleanVal);
			}

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

			cstmt.setObject(1,oMaxNumericVal,java.sql.Types.NUMERIC,2);
			cstmt.executeUpdate();

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

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


	/*
	 * @testName:         testSetObject102
	 * @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 Bit_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 testSetObject102() throws Fault
	{
		Boolean oMinNumericVal=null;
		BigDecimal rNumericVal=null;
		String sminNumericVal=null;
		BigDecimal minNumericVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Minimum Value of Boolean to be Updated in Numeric Table
			sminNumericVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinNumericVal= new Boolean(sminNumericVal);
				if(sminNumericVal.equalsIgnoreCase("true"))
				{
					sminNumericVal="1";
				}
				else
				{
					sminNumericVal="0";
				}
			}
			else
			{
				booleanVal= (sminNumericVal.trim().equals("1"))? true : false;
				oMinNumericVal=new Boolean(booleanVal);
			}
			
			minNumericVal = new BigDecimal(sminNumericVal);
			logMsg("Minimum Double Value to be updated in Numeric Table :" + oMinNumericVal.toString());

			cstmt.setObject(1,oMinNumericVal,java.sql.Types.NUMERIC,2);
			cstmt.executeUpdate();

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

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


	/*
	 * @testName:         testSetObject103
	 * @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 maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_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 testSetObject103() throws Fault
	{
		Boolean oMaxBooleanVal=null;
		String smaxBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Maximum Value of Bit to be Updated in Bit Table
			smaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMaxBooleanVal= new Boolean(smaxBooleanVal);
			}
			else
			{
				booleanVal= (smaxBooleanVal.trim().equals("1"))? true : false;
				oMaxBooleanVal=new Boolean(booleanVal);
			}

			logMsg("Maximum Bit Value to be updated :" + oMaxBooleanVal);
			cstmt.setObject(1,oMaxBooleanVal,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);
			
			Object obj = rs.getObject(1);
			rStringVal = obj.toString();
			rStringVal = rStringVal.trim();
			
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value from ctssql.stmt:" + oMaxBooleanVal);

			//if (rBooleanVal.equals(oMaxBooleanVal))
			
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" 
			// 2. A driver doesn't support boolean , saves boolean as "1" 
			// 3. A driver doesn't support boolean , saves boolean as "true" 
			
			if (rStringVal.equals(oMaxBooleanVal.toString()) || rStringVal.equals(smaxBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bit_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject104
	 * @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 Null_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 testSetObject104() throws Fault
	{
		Boolean oMinBooleanVal=null;
		String sminBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Minimum Value of Bit to be Updated
			sminBooleanVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinBooleanVal= new Boolean(sminBooleanVal);
			}
			else
			{
				booleanVal= (sminBooleanVal.trim().equals("1"))? true : false;
				oMinBooleanVal=new Boolean(booleanVal);
			}
			
			logMsg("Minimum Bit Value to be updated :" + oMinBooleanVal);
			cstmt.setObject(1,oMinBooleanVal,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);
			
			Object obj = rs.getObject(1);
			rStringVal = obj.toString();
			rStringVal = rStringVal.trim();
			
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned Boolean Value from ctssql.stmt:" + oMinBooleanVal);

			//if (rBooleanVal.equals(oMinBooleanVal))
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" 
			// 2. A driver doesn't support boolean , saves boolean as "1" 
			// 3. A driver doesn't support boolean , saves boolean as "true" 
						
			if (rStringVal.equals(oMinBooleanVal.toString()) || rStringVal.equals(sminBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bit_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject105
	 * @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 Bit_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 testSetObject105() throws Fault
	{
		Boolean oMaxBooleanVal=null;
		String smaxBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Maximum Value of Boolean to be Updated in Char Table
			smaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMaxBooleanVal= new Boolean(smaxBooleanVal);
			}
			else
			{
				booleanVal= (smaxBooleanVal.trim().equals("1"))? true : false;
				oMaxBooleanVal=new Boolean(booleanVal);
			}
			
			logMsg("Maximum Boolean Value to be updated in Char Table :" + oMaxBooleanVal);
			cstmt.setObject(1,oMaxBooleanVal,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=(String) rs.getObject(1);
			rStringVal=rStringVal.trim();
			//booleanVal= (rStringVal.trim().equals("true"))? true : false;
			//rBooleanVal=new Boolean(booleanVal);
			logMsg("Returned String Value from database:" + rStringVal);
			logMsg("Returned Boolean Value from ctssql.stmt:" + oMaxBooleanVal);

			//if (rBooleanVal.equals(oMaxBooleanVal))
			
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" in char_tab
			// 2. A driver doesn't support boolean , saves boolean as "1" in char_tab
			// 3. A driver doesn't support boolean , saves boolean as "true" in char_tab
			
			if (rStringVal.equals(oMaxBooleanVal.toString()) || rStringVal.equals(smaxBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject106
	 * @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 Bit_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 testSetObject106() throws Fault
	{
		Boolean oMinBooleanVal=null;
		String sminBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Minimum Value of Boolean to be Updated in Char Table
			sminBooleanVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinBooleanVal= new Boolean(sminBooleanVal);
			}
			else
			{
				booleanVal= (sminBooleanVal.trim().equals("1"))? true : false;
				oMinBooleanVal=new Boolean(booleanVal);
			}

			logMsg("Minimum Boolean Value to be updated in Char Table :" + oMinBooleanVal);
			cstmt.setObject(1,oMinBooleanVal,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=(String) rs.getObject(1);
			rStringVal=rStringVal.trim();
			//booleanVal= (rStringVal.trim().equals("true"))? true : false;
			//rBooleanVal=new Boolean(booleanVal);
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned Boolean Value from ctssql.stmt:" + oMinBooleanVal);

			//if (rBooleanVal.equals(oMinBooleanVal))
			
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" in char_tab
			// 2. A driver doesn't support boolean , saves boolean as "1" in char_tab
			// 3. A driver doesn't support boolean , saves boolean as "true" in char_tab
			
			if (rStringVal.equals(oMinBooleanVal.toString()) || rStringVal.equals(sminBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject107
	 * @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 Varchar_Tab with the maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Varchar_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject107() throws Fault
	{
		Boolean oMaxBooleanVal=null;
		String smaxBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal ;
		try
		{

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

			//to extract the Maximum Value of Boolean to be Updated in Varchar Table
			smaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMaxBooleanVal= new Boolean(smaxBooleanVal);
			}
			else
			{
				booleanVal= (smaxBooleanVal.trim().equals("1"))? true : false;
				oMaxBooleanVal=new Boolean(booleanVal);
			}
			
			logMsg("Maximum Boolean Value to be updated in Varchar Table :" + oMaxBooleanVal);
			cstmt.setObject(1,oMaxBooleanVal,java.sql.Types.VARCHAR);
			cstmt.executeUpdate();

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

			rStringVal=(String) rs.getObject(1);
			rStringVal=rStringVal.trim();
			//booleanVal= (rStringVal.trim().equals("true"))? true : false;
			//rBooleanVal=new Boolean(booleanVal);
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value from ctssql.stmt:" + oMaxBooleanVal);

			//if (rBooleanVal.equals(oMaxBooleanVal))
			
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" in char_tab
			// 2. A driver doesn't support boolean , saves boolean as "1" in char_tab
			// 3. A driver doesn't support boolean , saves boolean as "true" in char_tab
			
			if (rStringVal.equals(oMaxBooleanVal.toString()) || rStringVal.equals(smaxBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Varchar_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject108
	 * @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 Varchar_Tab with the minimum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Varchar_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject108() throws Fault
	{
		Boolean oMinBooleanVal=null;
		String sminBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal ;
		try
		{

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

			//to extract the Minimum Value of Boolean to be Updated in Varchar Table
			sminBooleanVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinBooleanVal= new Boolean(sminBooleanVal);
			}
			else
			{
				booleanVal= (sminBooleanVal.trim().equals("1"))? true : false;
				oMinBooleanVal=new Boolean(booleanVal);
			}
			
			logMsg("Minimum Boolean Value to be updated in Varchar Table :" + oMinBooleanVal);
			cstmt.setObject(1,oMinBooleanVal,java.sql.Types.VARCHAR);
			cstmt.executeUpdate();

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

			rStringVal=(String) rs.getObject(1);
			rStringVal=rStringVal.trim();
			//booleanVal= (rStringVal.trim().equals("true"))? true : false;
			//rBooleanVal=new Boolean(booleanVal);
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned Boolean Value from ctssql.stmt:" + oMinBooleanVal);

			//if (rBooleanVal.equals(oMinBooleanVal))
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" in char_tab
			// 2. A driver doesn't support boolean , saves boolean as "1" in char_tab
			// 3. A driver doesn't support boolean , saves boolean as "true" in char_tab
			
			if (rStringVal.equals(oMinBooleanVal.toString()) || rStringVal.equals(sminBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Varchar_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject109
	 * @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 Longvarchar_Tab with the maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Longvarchar_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject109() throws Fault
	{
		Boolean oMaxBooleanVal=null;
		String smaxBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal ;
		try
		{

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

			//to extract the Maximum Value of Boolean to be Updated in Longvarchar Table
			smaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMaxBooleanVal= new Boolean(smaxBooleanVal);
			}
			else
			{
				booleanVal= (smaxBooleanVal.trim().equals("1"))? true : false;
				oMaxBooleanVal=new Boolean(booleanVal);
			}
			
			logMsg("Maximum Boolean Value to be updated in Longvarchar Table :" + smaxBooleanVal);

			cstmt.setObject(1,oMaxBooleanVal,java.sql.Types.LONGVARCHAR);
			cstmt.executeUpdate();

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

			rStringVal=(String) rs.getObject(1);
			rStringVal=rStringVal.trim();
			//booleanVal= (rStringVal.trim().equals("true"))? true : false;
			//rBooleanVal=new Boolean(booleanVal);
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value from ctssql.stmt:" + oMaxBooleanVal);

			//if (rBooleanVal.equals(oMaxBooleanVal))
			
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" in char_tab
			// 2. A driver doesn't support boolean , saves boolean as "1" in char_tab
			// 3. A driver doesn't support boolean , saves boolean as "true" in char_tab
			
			if (rStringVal.equals(oMaxBooleanVal.toString()) || rStringVal.equals(smaxBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Longvarcharnull_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject110
	 * @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 Longvarchar_Tab with the minimum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Longvarchar_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject110() throws Fault
	{
		Boolean oMinBooleanVal=null;
		String sminBooleanVal=null;
		String rStringVal=null;
		Boolean rBooleanVal=null;
		boolean booleanVal ;
		try
		{

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

			//to extract the Minimum Value of Boolean to be Updated in Longvarchar Table
			sminBooleanVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinBooleanVal= new Boolean(sminBooleanVal);
			}
			else
			{
				booleanVal= (sminBooleanVal.trim().equals("1"))? true : false;
				oMinBooleanVal=new Boolean(booleanVal);
			}
			
			logMsg("Minimum Boolean Value to be updated in Longvarchar Table :" + oMinBooleanVal);

			cstmt.setObject(1,oMinBooleanVal,java.sql.Types.LONGVARCHAR);
			cstmt.executeUpdate();

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

			rStringVal=(String) rs.getObject(1);
			rStringVal=rStringVal.trim();
			//booleanVal= (rStringVal.trim().equals("true"))? true : false;
			//rBooleanVal=new Boolean(booleanVal);
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned Boolean Value from ctssql.stmt:" + oMinBooleanVal);

			//if (rBooleanVal.equals(oMinBooleanVal))
			
			// Tests will pass for three possibilities.
			// 1. A driver supports boolean and saves boolean as "true" in char_tab
			// 2. A driver doesn't support boolean , saves boolean as "1" in char_tab
			// 3. A driver doesn't support boolean , saves boolean as "true" in char_tab
			
			if (rStringVal.equals(oMinBooleanVal.toString()) || rStringVal.equals(sminBooleanVal.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(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Longvarcharnull_Tab",conn);
			}
			catch(Exception e)
			{
				logMsg("Exception in finally block" +e);
			}
		}
	}


	/*
	 * @testName:         testSetObject111
	 * @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 Tinyint_Tab with the maximum value of the Tinyint_Tab.
	 *                    Execute a query to retrieve the Min_Val from Tinyint_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject111() throws Fault
	{
		Integer maxIntegerVal = null ;
		Integer rTinyintVal=null;
		String smaxStringVal=null;
		try
		{

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

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

			cstmt.setObject(1,maxIntegerVal,java.sql.Types.TINYINT);
			cstmt.executeUpdate();

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

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

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


	/*
	 * @testName:         testSetObject112
	 * @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 Tinyint_Tab with the minimum value of the Tinyint_Tab.
	 *                    Execute a query to retrieve the Null_Val from Tinyint_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject112() throws Fault
	{
		Integer minIntegerVal = null ;
		Integer rTinyintVal=null;
		String sminStringVal=null;
		try
		{

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

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

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

			cstmt.setObject(1,minIntegerVal,java.sql.Types.TINYINT);
			cstmt.executeUpdate();

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

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

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


	/*
	 * @testName:         testSetObject113
	 * @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 testSetObject113() throws Fault
	{
		Integer maxIntegerVal = null ;
		Integer rSmallintVal=null;
		String smaxStringVal=null;
		try
		{

			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);

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

			cstmt.setObject(1,maxIntegerVal,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();

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

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


	/*
	 * @testName:         testSetObject114
	 * @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 testSetObject114() throws Fault
	{
		Integer minIntegerVal = null ;
		Integer 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);

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

			cstmt.setObject(1,minIntegerVal,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();

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

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


	/*
	 * @testName:         testSetObject115
	 * @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 testSetObject115() throws Fault
	{
		Integer maxIntegerVal = null;
		Integer 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);
			maxIntegerVal = new Integer(smaxStringVal);
			logMsg("Minimum Integer Value :" + maxIntegerVal);

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

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

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

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


	/*
	 * @testName:         testSetObject116
	 * @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 testSetObject116() throws Fault
	{
		Integer minIntegerVal = null ;
		Integer 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 Minimum Value of Integer to be Updated
			sminStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			minIntegerVal = new Integer(sminStringVal);
			logMsg("Minimum Integer Value :" + minIntegerVal);

			cstmt.setObject(1,minIntegerVal,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();

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

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


	/*
	 * @testName:         testSetObject117
	 * @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 Integer_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 testSetObject117() throws Fault
	{
		Long maxBigintVal = null ;
		Integer maxIntegerVal = null ;
		Long 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("Integer_Tab",1,sqlp,conn);
			maxBigintVal = new Long(smaxStringVal);
			maxIntegerVal = new Integer(smaxStringVal);
			logMsg("Maximum Long Value :" + maxIntegerVal);

			cstmt.setObject(1,maxIntegerVal,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();

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

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


	/*
	 * @testName:         testSetObject118
	 * @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 Integer_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 testSetObject118() throws Fault
	{
		Long minBigintVal = null ;
		Integer minIntegerVal=null;
		Long 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("Integer_Tab",2,sqlp,conn);
			minIntegerVal=new Integer(sminStringVal);
			minBigintVal = new Long(sminStringVal);
			logMsg("Minimum Long Value :" + minBigintVal);

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

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

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

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


	/*
	 * @testName:         testSetObject119
	 * @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 Integer_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 testSetObject119() throws Fault
	{
		Float maxRealVal = null ;
		Integer maxIntegerVal=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 Float to be Updated
			smaxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			maxIntegerVal=new Integer(smaxStringVal);
			maxRealVal = new Float(smaxStringVal);
			logMsg("Maximum Real Value :" + maxRealVal);

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

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


	/*
	 * @testName:         testSetObject120
	 * @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 Integer_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 testSetObject120() throws Fault
	{
		Float minRealVal = null ;
		Integer minIntegerVal=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 Float to be Updated
			sminStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			minIntegerVal=new Integer(sminStringVal);
			minRealVal = new Float(sminStringVal);
			logMsg("Minimum Real Value :" + minRealVal);

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


	/* cleanup */
	public void  cleanup() throws Fault
	{
		try
		{
			
			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");
		}
	}
}
