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

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

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

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

	//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)
	{
		callStmtClient12 theTests = new callStmtClient12();
		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:         testSetObject81
	 * @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 Decimal_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 testSetObject81() throws Fault
	{
		BigDecimal maxBigDecimalVal = null ;
		String maxStringVal=null;
		String rStringVal=null;
		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Varchar_In_Null(?)}");

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

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

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

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

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


	/* @testName:         testSetObject82
	 * @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 Decimal_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 testSetObject82() throws Fault
	{
		BigDecimal maxBigDecimalVal = null;
		String maxStringVal=null;
		String rStringVal=null;
		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Varchar_In_Null(?)}");

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

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.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=rs.getObject(1).toString();
			rStringVal=rStringVal.trim();
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value after Updation:" + maxStringVal);

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


	/*
	 * @testName:         testSetObject83
	 * @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 Decimal_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 testSetObject83() throws Fault
	{
		String maxStringVal=null;
		BigDecimal maxBigDecimalVal = null ;
		String rStringVal=null;
		try
		{
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Longvarchar_In_Null(?)}");

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

			cstmt.setObject(1,maxBigDecimalVal,java.sql.Types.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=rs.getObject(1).toString();
			rStringVal=rStringVal.trim();
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value from ctssql.stmt:" + maxStringVal);

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


	/*
	 * @testName:         testSetObject84
	 * @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 Decimal_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 testSetObject84() throws Fault
	{
		String maxStringVal=null;
		BigDecimal maxBigDecimalVal = null ;
		String rStringVal=null;
		try
		{
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);
			//get the CallableStatement object
			cstmt = conn.prepareCall("{call Longvarchar_In_Null(?)}");

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

			cstmt.setObject(1,maxBigDecimalVal,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=rs.getObject(1).toString();
			rStringVal=rStringVal.trim();
			logMsg("Returned String Value after Updation:" + rStringVal);
			logMsg("Returned String Value ctssql.stmt:" + maxStringVal);

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


	/*
	 * @testName:         testSetObject85
	 * @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 Bit_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 testSetObject85() throws Fault
	{
		Boolean oMaxTinyintVal=null;
		Integer rTinyintVal=null;
		String smaxTinyintVal=null;
		Integer maxTinyintVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Maximum Value of Tinyint to be Updated
			logMsg("extracting value from ctssql.stmt");
			smaxTinyintVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			smaxTinyintVal = smaxTinyintVal.trim();
			
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				logMsg("database supports Boolean datatype.");
				logMsg("value from dml " + smaxTinyintVal);
				oMaxTinyintVal= new Boolean(smaxTinyintVal);
				if(smaxTinyintVal.equalsIgnoreCase("true"))
				{
					smaxTinyintVal="1";
				}
				else
				{
					smaxTinyintVal="0";
				}
			}
			else
			{
				booleanVal= (smaxTinyintVal.trim().equals("1"))? true : false;
				oMaxTinyintVal=new Boolean(booleanVal);
			}

			logMsg("Maximum Tinyint Value :" + smaxTinyintVal);
			maxTinyintVal = new Integer(smaxTinyintVal);
			
			logMsg("Calling setObject method :" );
			cstmt.setObject(1,oMaxTinyintVal,java.sql.Types.TINYINT);
			cstmt.executeUpdate();

			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Min_Val_Query=sqlp.getProperty("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 ctssql.stmt:" + maxTinyintVal);


			if ((rTinyintVal.compareTo(maxTinyintVal))==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:         testSetObject86
	 * @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 Bit_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 testSetObject86() throws Fault
	{
		Boolean oMinTinyintVal=null;
		Integer rTinyintVal=null;
		String sminTinyintVal=null;
		Integer minTinyintVal=null;
		boolean booleanVal;
		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
			sminTinyintVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinTinyintVal= new Boolean(sminTinyintVal);
				if(sminTinyintVal.equalsIgnoreCase("true"))
				{
					sminTinyintVal="1";
				}
				else
				{
					sminTinyintVal="0";
				}
			}
			else
			{
				booleanVal= (sminTinyintVal.trim().equals("1"))? true : false;
				oMinTinyintVal=new Boolean(booleanVal);
			}

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

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

			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Null_Val_Query=sqlp.getProperty("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:" + minTinyintVal);

			if (rTinyintVal.compareTo(minTinyintVal)==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:         testSetObject87
	 * @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 Bit_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 testSetObject87() throws Fault
	{
		Boolean oMaxSmallintVal=null;
		Integer rSmallintVal=null;
		String smaxSmallintVal=null;
		Integer maxSmallintVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Maximum Value of Boolean to be Updated in Smallint table
			smaxSmallintVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMaxSmallintVal= new Boolean(smaxSmallintVal);
				if(smaxSmallintVal.equalsIgnoreCase("true"))
				{
					smaxSmallintVal="1";
				}
				else
				{
					smaxSmallintVal="0";
				}
			}
			else
			{
				booleanVal= (smaxSmallintVal.trim().equals("1"))? true : false;
				oMaxSmallintVal=new Boolean(booleanVal);
			}
			
			maxSmallintVal = new Integer(smaxSmallintVal);
			logMsg("Maximum Smallint Value :" + oMaxSmallintVal.toString());

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

			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Min_Val_Query=sqlp.getProperty("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 ctssql.stmt:" + maxSmallintVal);

			if (rSmallintVal.compareTo(maxSmallintVal)==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:         testSetObject88
	 * @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 Bit_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 testSetObject88() throws Fault
	{
		Boolean oMinSmallintVal=null;
		Integer rSmallintVal=null;
		String sminSmallintVal=null;
		Integer minSmallintVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Minimum Value of Boolean to be Updated in Smallint table
			sminSmallintVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			
			
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinSmallintVal= new Boolean(sminSmallintVal);
				if(sminSmallintVal.equalsIgnoreCase("true"))
				{
					sminSmallintVal="1";
				}
				else
				{
					sminSmallintVal="0";
				}
			}
			else
			{
				booleanVal= (sminSmallintVal.trim().equals("1"))? true : false;
				oMinSmallintVal=new Boolean(booleanVal);
			}
			
			minSmallintVal = new Integer(sminSmallintVal);
			logMsg("Minimum Smallint Value :" + oMinSmallintVal.toString());

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

			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Null_Val_Query=sqlp.getProperty("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 :" + minSmallintVal);

			if (rSmallintVal.compareTo(minSmallintVal)==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:         testSetObject89
	 * @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 Bit_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 testSetObject89() throws Fault
	{
		Boolean oMaxIntegerVal=null;
		Integer rIntegerVal=null;
		String smaxIntegerVal=null;
		Integer maxIntegerVal=null;
		boolean booleanVal;
		try
		{

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

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

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

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

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

			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Min_Val_Query=sqlp.getProperty("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 from 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:         testSetObject90
	 * @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 Bit_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 testSetObject90() throws Fault
	{
		Boolean oMinIntegerVal=null;
		Integer rIntegerVal=null;
		String sminIntegerVal=null;
		Integer minIntegerVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Minimum Value of Boolean to be Updated in Integer table
			sminIntegerVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinIntegerVal= new Boolean(sminIntegerVal);
				if(sminIntegerVal.equalsIgnoreCase("true"))
				{
					sminIntegerVal="1";
				}
				else
				{
					sminIntegerVal="0";
				}
			}
			else
			{
				booleanVal= (sminIntegerVal.trim().equals("1"))? true : false;
				oMinIntegerVal=new Boolean(booleanVal);
			}
			
			minIntegerVal = new Integer(sminIntegerVal);
			logMsg("Minimum Integer Value :" + oMinIntegerVal.toString());

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

			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Null_Val_Query=sqlp.getProperty("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 after Updation:" + 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:         testSetObject91
	 * @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 Bit_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 testSetObject91() throws Fault
	{
		Boolean oMaxBigintVal=null;
		Long rBigintVal=null;
		String smaxBigintVal=null;
		Long maxBigintVal=null;
		boolean booleanVal;
		try
		{

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

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

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

			cstmt.setObject(1,oMaxBigintVal,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:         testSetObject92
	 * @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 Bit_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 testSetObject92() throws Fault
	{
		Boolean oMinBigintVal=null;
		Long rBigintVal=null;
		String sminBigintVal=null;
		Long minBigintVal=null;
		boolean booleanVal;
		try
		{

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

			//to extract the Minimum Value of Boolean to be Updated in Bigint table
			sminBigintVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMinBigintVal= new Boolean(sminBigintVal);
				if(sminBigintVal.equalsIgnoreCase("true"))
				{
					sminBigintVal="1";
				}
				else
				{
					sminBigintVal="0";
				}
			}
			else
			{
				booleanVal= (sminBigintVal.trim().equals("1"))? true : false;
				oMinBigintVal=new Boolean(booleanVal);
			}
			
			minBigintVal = new Long(sminBigintVal);
			logMsg("Minimum Long Value :" + oMinBigintVal.toString());

			cstmt.setObject(1,oMinBigintVal,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:         testSetObject93
	 * @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 Bit_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 testSetObject93() throws Fault
	{
		Boolean oMaxRealVal=null;
		Float rRealVal=null;
		String smaxRealVal=null;
		Float maxRealVal = null;
		boolean booleanVal;
		try
		{

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

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

			String testType = new String("BOOLEAN");
			if(csSch.supportsType(testType,conn))
			{
				oMaxRealVal= new Boolean(smaxRealVal);
				if(smaxRealVal.equalsIgnoreCase("true"))
				{
					smaxRealVal="1";
				}
				else
				{
					smaxRealVal="0";
				}
			}
			else
			{
				booleanVal= (smaxRealVal.trim().equals("1"))? true : false;
				oMaxRealVal=new Boolean(booleanVal);
			}
		
			maxRealVal= new Float(smaxRealVal);
			logMsg("Maximum Long Value :" + oMaxRealVal.toString());

			cstmt.setObject(1,oMaxRealVal,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 Float Value after Updation:" + rRealVal);
			logMsg("Returned Float 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:         testSetObject94
	 * @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 Bit_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 testSetObject94() throws Fault
	{
		Boolean oMinRealVal=null;
		Float rRealVal=null;
		String sminRealVal=null;
		Float minRealVal=null;
		boolean booleanVal;
		try
		{

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

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

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

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

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

			Object oRealVal= rs.getObject(1);
			rRealVal = new Float(oRealVal.toString());
			logMsg("Returned Float Value after Updation:" + rRealVal);
			logMsg("Returned Float 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);
			}
		}
	}


	/*
	 * @testName:         testSetObject95
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    method sets the value of the designated parameter using the
	 *                    given object. The second parameter must be of type Object;
	 *                    therefore, the java.lang equivalent objects should be used
	 *                    for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java
	 *                    Object types to SQL types. The given argument will be converted
	 *                    to the corresponding SQL type before being sent to the database.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Float_Tab with the maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Min_Val from Float_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject95() throws Fault
	{
		Boolean oMaxFloatVal=null;
		Double rFloatVal=null;
		String smaxFloatVal=null;
		Double maxFloatVal=null;
		boolean booleanVal;
		try
		{

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

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

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

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

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

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

			rFloatVal=(Double)rs.getObject(1);
			logMsg("Returned Float Value after Updation:" + rFloatVal);
			logMsg("Returned Float Value from ctssql.stmt:" + maxFloatVal);

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


	/*
	 * @testName:         testSetObject96
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    method sets the value of the designated parameter using the
	 *                    given object. The second parameter must be of type Object;
	 *                    therefore, the java.lang equivalent objects should be used
	 *                    for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java
	 *                    Object types to SQL types. The given argument will be converted
	 *                    to the corresponding SQL type before being sent to the database.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Float_Tab with the minimum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Float_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject96() throws Fault
	{
		Boolean oMinFloatVal=null;
		Double rFloatVal=null;
		String sminFloatVal=null;
		Double minFloatVal=null;
		boolean booleanVal;
		try
		{

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

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

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

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

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

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

			rFloatVal=(Double) rs.getObject(1);
			logMsg("Returned Float Value after Updation:" + rFloatVal);
			logMsg("Returned Float Value from ctssql.stmt:" + minFloatVal);

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


	/*
	 * @testName:         testSetObject97
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    method sets the value of the designated parameter using the
	 *                    given object. The second parameter must be of type Object;
	 *                    therefore, the java.lang equivalent objects should be used
	 *                    for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java
	 *                    Object types to SQL types. The given argument will be converted
	 *                    to the corresponding SQL type before being sent to the database.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Min_Val
	 *                    of the Double_Tab with the maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Min_Val from Double_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject97() throws Fault
	{
		Boolean oMaxDoubleVal=null;
		Double rDoubleVal=null;
		String smaxDoubleVal=null;
		Double maxDoubleVal=null;
		boolean booleanVal;
		try
		{

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

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

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

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

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

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

			rDoubleVal=(Double) rs.getObject(1);
			logMsg("Returned Double Value after Updation:" + rDoubleVal);
			logMsg("Returned Double Value from ctssql.stmt:" + maxDoubleVal);

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


	/*
	 * @testName:         testSetObject98
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    method sets the value of the designated parameter using the
	 *                    given object. The second parameter must be of type Object;
	 *                    therefore, the java.lang equivalent objects should be used
	 *                    for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java
	 *                    Object types to SQL types. The given argument will be converted
	 *                    to the corresponding SQL type before being sent to the database.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Double_Tab with the minimum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Double_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject98() throws Fault
	{
		Boolean oMinDoubleVal = null;
		Double rDoubleVal=null;
		String sminDoubleVal=null;
		Double minDoubleVal=null;
		boolean booleanVal;
		try
		{

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

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

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

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

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

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

			rDoubleVal=(Double) rs.getObject(1);
			logMsg("Returned Double Value after Updation:" + rDoubleVal);
			logMsg("Returned Double Value from ctssql.stmt:" + minDoubleVal);

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


	/*
	 * @testName:         testSetObject99
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    method sets the value of the designated parameter using the
	 *                    given object. The second parameter must be of type Object;
	 *                    therefore, the java.lang equivalent objects should be used
	 *                    for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java
	 *                    Object types to SQL types. The given argument will be converted
	 *                    to the corresponding SQL type before being sent to the database.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Decimal_Tab with the maximum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Decimal_Tab. Compare
	 *                    the returned value with the maximum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject99() throws Fault
	{
		Boolean oMaxDecimalVal=null;
		BigDecimal rDecimalVal=null;
		String smaxDecimalVal=null;
		BigDecimal maxDecimalVal=null;
		boolean booleanVal;
		try
		{

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

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

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

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

			cstmt.setObject(1,oMaxDecimalVal,java.sql.Types.DECIMAL,2);
			cstmt.executeUpdate();

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

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

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


	/*
	 * @testName:         testSetObject100
	 * @assertion:        A CallableStatement object provides a way to call stored procedures
	 *                    in a standard way for all RDBMSs.  It can take variable number of
	 *                    parameters used for input (IN parameters), output (OUT parameters)
	 *                    or both (INOUT parameters).  (See section 9.1 of JDBC 2.0 API
	 *                    Reference & Tutorial, Second Edition)
	 *
	 *                    The drivers must provide full support for CallableStatement methods
	 *                    that apply to SQL92 types.  All parameter types (IN, OUT, INOUT)
	 *                    must be supported (See section 6.2.2.3 of Java2 Platform Enterprise
	 *                    Edition (J2EE) specification v 1.2)
	 *
	 *                    The setObject(int parameterIndex, Object x,int targetSqlType)
	 *                    method sets the value of the designated parameter using the
	 *                    given object. The second parameter must be of type Object;
	 *                    therefore, the java.lang equivalent objects should be used
	 *                    for built-in types.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java
	 *                    Object types to SQL types. The given argument will be converted
	 *                    to the corresponding SQL type before being sent to the database.
	 *                    (See JDK 1.2.2 API documentation)
	 *
	 * @test_Strategy:    This test case is meant for checking the support for IN parameter
	 *                    in CallableStatement Interface.
	 *                    Get a CallableStatement object from the connection to the database.
	 *                    Using the IN parameter of that object,update the column Null_Val
	 *                    of the Decimal_Tab with the minimum value of the Bit_Tab.
	 *                    Execute a query to retrieve the Null_Val from Decimal_Tab. Compare
	 *                    the returned value with the minimum value extracted from ctssql.stmt
	 *                    file. Both of them should be equal.
	 */
	public void testSetObject100() throws Fault
	{
		Boolean oMinDecimalVal=null;
		BigDecimal rDecimalVal=null;
		String sminDecimalVal=null;
		BigDecimal minDecimalVal=null;
		boolean booleanVal;
		try
		{

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

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

			minDecimalVal = new BigDecimal(sminDecimalVal);
			logMsg("Minimum Double Value to be updated in Decimal Table :" + oMinDecimalVal.toString());

			cstmt.setObject(1,oMinDecimalVal,java.sql.Types.DECIMAL,2);
			cstmt.executeUpdate();

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

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

			if( (rDecimalVal.compareTo(minDecimalVal))==0)
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed!");
			}
		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception " + sqle.getMessage());
			throw new Fault("Call to setObject is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.close();
					rs=null;
				}
				if(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Decimal_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");
		}
	}
}
