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

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

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

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

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

	//Harness requirements

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

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

	/*
	 * @testName:         testSetObject141
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Integer_Tab with the maximum value of Integer_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject141() throws Fault
	{
		Long maxLongVal;
		String rIntegerVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Integer_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Integer_In_Min(?)}");

			//to extract the Minimum Value to be Updated
			smaxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			Integer maxIntegerVal = new Integer(smaxStringVal);
			maxLongVal = new Long(smaxStringVal);
			logMsg("Minimum  Value to be updated :" + maxLongVal);

			//to set the Long
			cstmt.setObject(1,maxLongVal,java.sql.Types.INTEGER);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Integer_Query_Min","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			rIntegerVal= "" + rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rIntegerVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxIntegerVal);

			if (rIntegerVal.trim().equals(smaxStringVal.trim()))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject142
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Integer_Tab with the minimum value of Integer_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject142() throws Fault
	{
		Long minLongVal;
		String rIntegerVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Integer_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Integer_In_Null(?)}");

			//to extract the Maximum Value to be Updated
			sminStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			Integer minIntegerVal = new Integer(sminStringVal);
			minLongVal = new Long(sminStringVal);
			logMsg("Maximum Value to be updated :" + minLongVal);

			//to set the Value
			cstmt.setObject(1,minLongVal,java.sql.Types.INTEGER);

			//execute the procedure
			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();
			rIntegerVal= "" + rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rIntegerVal);
			logMsg("Returned Value from ctssql.stmt:"+ minIntegerVal);

			if (rIntegerVal.trim().equals(sminStringVal))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}


	/*
	 * @testName:         testSetObject143
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Bigint_Tab with the maximum value of Bigint_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject143() throws Fault
	{
		Long maxLongVal;
		String rLongVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Bigint_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bigint_In_Min(?)}");

			//to extract the Minimum Value to be Updated
			smaxStringVal = rsSch.extractVal("Bigint_Tab",1,sqlp,conn);
			maxLongVal = new Long(smaxStringVal);
			logMsg("Minimum  Value to be updated :" + maxLongVal);

			//to set the Long
			cstmt.setObject(1,maxLongVal,java.sql.Types.BIGINT);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Bigint_Query_Min","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			rLongVal= "" + rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rLongVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxLongVal);

			if (rLongVal.trim().equals(smaxStringVal.trim()))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject144
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Bigint_Tab with the minimum value of Bigint_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject144() throws Fault
	{
		Long minLongVal;
		String rLongVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Bigint_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bigint_In_Null(?)}");

			//to extract the Maximum Value to be Updated
			sminStringVal = rsSch.extractVal("Bigint_Tab",2,sqlp,conn);
			minLongVal = new Long(sminStringVal);
			logMsg("Maximum Value to be updated :" + minLongVal);

			//to set the Value
			cstmt.setObject(1,minLongVal,java.sql.Types.BIGINT);

			//execute the procedure
			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("Bigint_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			rLongVal= "" + rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rLongVal);
			logMsg("Returned Value from ctssql.stmt:"+ minLongVal);

			if (rLongVal.trim().equals(sminStringVal.trim()))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}


	/*
	 * @testName:         testSetObject145
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Real_Tab with the maximum value of Real_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject145() throws Fault
	{
		BigDecimal maxLongVal;
		Float rFloatVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Real_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Real_In_Min(?)}");

			//to extract the Minimum Value to be Updated
			smaxStringVal = rsSch.extractVal("Real_Tab",1,sqlp,conn);
			Float maxFloatVal = new Float(smaxStringVal);
			maxLongVal = new BigDecimal(smaxStringVal);
			logMsg("Minimum  Value to be updated :" + maxLongVal);

			//to set the Long
			cstmt.setObject(1,maxLongVal,java.sql.Types.REAL);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Real_Query_Min","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			Object oFloatVal= rs.getObject(1);
			rFloatVal = new Float(oFloatVal.toString());
			
			logMsg("Returned Value after Updation:"+ rFloatVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxFloatVal);

			if (rFloatVal.compareTo(maxFloatVal)==0)
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject146
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Real_Tab with the minimum value of Real_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject146() throws Fault
	{
		BigDecimal minLongVal;
		Float rFloatVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Real_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Real_In_Null(?)}");

			//to extract the Maximum Value to be Updated
			sminStringVal = rsSch.extractVal("Real_Tab",2,sqlp,conn);
			Float minFloatVal = new Float(sminStringVal);
			minLongVal = new BigDecimal(sminStringVal);
			logMsg("Maximum Value to be updated :" + minLongVal);

			//to set the Value
			cstmt.setObject(1,minLongVal,java.sql.Types.REAL);

			//execute the procedure
			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("Real_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			Object oFloatVal= rs.getObject(1);
			rFloatVal = new Float(oFloatVal.toString());
			
			logMsg("Returned Value after Updation:"+ rFloatVal);
			logMsg("Returned Value from ctssql.stmt:"+ minFloatVal);

			if (rFloatVal.compareTo(minFloatVal)==0)
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}


	/*
	 * @testName:         testSetObject147
	 * @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 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.
	 *
	 *                    The JDBC specification specifies a standard mapping from Java
	 *                    Object types to SQL types. The given argument will be converted
	 *                    to the corresponding SQL type before being sent to the database.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Float_Tab with the maximum value of Float_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject147() throws Fault
	{
		BigDecimal maxLongVal;
		Float rFloatVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Float_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Float_In_Min(?)}");

			//to extract the Minimum Value to be Updated
			smaxStringVal = rsSch.extractVal("Float_Tab",1,sqlp,conn);
			Float maxFloatVal = new Float(smaxStringVal);
			maxLongVal = new BigDecimal(smaxStringVal);
			logMsg("Minimum  Value to be updated :" + maxLongVal);

			//to set the Long
			cstmt.setObject(1,maxLongVal,java.sql.Types.FLOAT);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Float_Query_Min","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			Object oFloatVal= rs.getObject(1);
			rFloatVal = new Float(oFloatVal.toString());
			
			logMsg("Returned Value after Updation:"+ rFloatVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxFloatVal);

			if (rFloatVal.compareTo(maxFloatVal)==0)
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject148
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Float_Tab with the minimum value of Float_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject148() throws Fault
	{
		BigDecimal minLongVal;
		Float rFloatVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Float_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Float_In_Null(?)}");

			//to extract the Maximum Value to be Updated
			sminStringVal = rsSch.extractVal("Float_Tab",2,sqlp,conn);
			Float minFloatVal = new Float(sminStringVal);
			minLongVal = new BigDecimal(sminStringVal);
			logMsg("Maximum Value to be updated :" + minLongVal);

			//to set the Value
			cstmt.setObject(1,minLongVal,java.sql.Types.FLOAT);

			//execute the procedure
			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("Float_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			Object oFloatVal= rs.getObject(1);
			rFloatVal = new Float(oFloatVal.toString());
			
			logMsg("Returned Value after Updation:"+ rFloatVal);
			logMsg("Returned Value from ctssql.stmt:"+ minFloatVal);

			if (rFloatVal.compareTo(minFloatVal)==0)
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject149
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Double_Tab with the maximum value of Double_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject149() throws Fault
	{
		BigDecimal maxLongVal;
		Double rDoubleVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Double_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Double_In_Min(?)}");

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

			//to set the Long
			cstmt.setObject(1,maxLongVal,java.sql.Types.DOUBLE);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Double_Query_Min","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			Object oDoubleVal= rs.getObject(1);
			rDoubleVal = new Double(oDoubleVal.toString());
			
			logMsg("Returned Value after Updation:"+ rDoubleVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxDoubleVal);

			if (rDoubleVal.compareTo(maxDoubleVal)==0)
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject150
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Double_Tab with the minimum value of Double_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject150() throws Fault
	{
		BigDecimal minLongVal;
		Double rDoubleVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Double_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Double_In_Null(?)}");

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

			//to set the Value
			cstmt.setObject(1,minLongVal,java.sql.Types.DOUBLE);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Null_Val_Query=sqlp.getProperty("Double_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			Object oDoubleVal= rs.getObject(1);
			rDoubleVal = new Double(oDoubleVal.toString());
			logMsg("Returned Value after Updation:"+ rDoubleVal);
			logMsg("Returned Value from ctssql.stmt:"+ minDoubleVal);

			if (rDoubleVal.compareTo(minDoubleVal)==0)
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject151
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Decimal_Tab with the maximum value of Decimal_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject151() throws Fault
	{
		
		BigDecimal rDecimalVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Decimal_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Decimal_In_Null(?)}");

			//We are testing a different object type. Taking from Decimal_Tab itself 
			//and converting to a Long before setting the object.
			smaxStringVal = rsSch.extractVal("Decimal_Tab",1,sqlp,conn);
			BigDecimal maxDecimalVal = new BigDecimal(smaxStringVal);			
			logMsg("Maximum Value to be updated :" + maxDecimalVal);

			//to set the Long
			cstmt.setObject(1,maxDecimalVal,java.sql.Types.DECIMAL);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Decimal_Query_Null","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			Object oDecimalVal= rs.getObject(1);
			rDecimalVal = new BigDecimal(oDecimalVal.toString());
			
			//logMsg("Returned Object is " + oDecimalVal.toString());
			logMsg("Returned Value after Updation:"+ rDecimalVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxDecimalVal);

			if ( (rDecimalVal.compareTo(maxDecimalVal)==0) )
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject152
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Decimal_Tab with the minimum value of Decimal_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject152() throws Fault
	{
		
		BigDecimal rDecimalVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Decimal_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Decimal_In_Null(?)}");

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

			//to set the Value
			cstmt.setObject(1,minDecimalVal,java.sql.Types.DECIMAL,15);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Null_Val_Query=sqlp.getProperty("Decimal_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			
			Object oDecimalVal= rs.getObject(1);
			rDecimalVal = new BigDecimal(oDecimalVal.toString());
			logMsg("Returned Value after Updation:"+ rDecimalVal);
			logMsg("Returned Value from ctssql.stmt:"+ minDecimalVal);

			if ( (rDecimalVal.compareTo(minDecimalVal)==0) )
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}


	/*
	 * @testName:         testSetObject153
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Numeric_Tab with the maximum value of Numeric_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject153() throws Fault
	{
		
		BigDecimal rDecimalVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Numeric_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Numeric_In_Null(?)}");

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

			//to set the Long
			cstmt.setObject(1,maxDecimalVal,java.sql.Types.NUMERIC);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Numeric_Query_Null","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			Object oDecimalVal= rs.getObject(1);
			rDecimalVal = new BigDecimal(oDecimalVal.toString());
			logMsg("Returned Value after Updation:"+ rDecimalVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxDecimalVal);

			if ( (rDecimalVal.compareTo(maxDecimalVal)==0) )
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.close();
					rs=null;
				}
				if(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch(Exception e)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject154
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Numeric_Tab with the minimum value of Numeric_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject154() throws Fault
	{
		
		BigDecimal rDecimalVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Numeric_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Numeric_In_Null(?)}");

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

			//to set the Value
			cstmt.setObject(1,minDecimalVal,java.sql.Types.NUMERIC,15);

			//execute the procedure
			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("Numeric_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			Object oDecimalVal= rs.getObject(1);
			rDecimalVal = new BigDecimal(oDecimalVal.toString());
			logMsg("Returned Value after Updation:"+ rDecimalVal);
			if ( (rDecimalVal.compareTo(minDecimalVal)==0) )
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.close();
					rs=null;
				}
				if(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch(Exception e)
			{

			}
		}
	}

/*
	 * @testName:         testSetObject155
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Bit_Tab with the maximum value of Bit_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject155() throws Fault
	{
		Long maxLongVal;
		Boolean rBooleanVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Bit_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bit_In_Min(?)}");

			//to extract the Minimum Value to be Updated
			smaxStringVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			Boolean maxBooleanVal = new Boolean(smaxStringVal);
			//maxLongVal = new Long(smaxStringVal);
			//logMsg("Minimum  Value to be updated :" + maxLongVal);

			//to set the Long
			cstmt.setObject(1,maxBooleanVal,java.sql.Types.BIT);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Bit_Query_Min","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			rBooleanVal= (Boolean) rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rBooleanVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxBooleanVal);

			if (rBooleanVal.equals(maxBooleanVal))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.close();
					rs=null;
				}
				if(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bit_Tab",conn);

			}
			catch(Exception e)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject156
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Bit_Tab with the minimum value of Bit_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject156() throws Fault
	{
		Long minLongVal;
		Boolean rBooleanVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Bit_Tab",sqlp,conn);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bit_In_Null(?)}");

			//to extract the Maximum Value to be Updated
			sminStringVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			Boolean minBooleanVal = new Boolean(sminStringVal);
			//minLongVal = new Long(sminStringVal);
			//logMsg("Maximum Value to be updated :" + minLongVal);

			//to set the Value
			cstmt.setObject(1,minBooleanVal,java.sql.Types.BIT);

			//execute the procedure
			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("Bit_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			rBooleanVal= (Boolean) rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rBooleanVal);
			logMsg("Returned Value from ctssql.stmt:"+ minBooleanVal);

			if (rBooleanVal.equals(minBooleanVal))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.close();
					rs=null;
				}
				if(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bit_Tab",conn);
			}
			catch(Exception e)
			{

			}
		}
	}

	
	/*
	 * @testName:         testSetObject157
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Char_Tab with the maximum value of Char_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject157() throws Fault
	{
		Long maxLongVal;
		String rStringVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Char_In_Name(?)}");

			//to extract the Minimum Value to be Updated
			smaxStringVal = rsSch.extractVal("Bigint_Tab",1,sqlp,conn);
			String maxStringVal = new String(smaxStringVal);
			maxLongVal = new Long(maxStringVal);
			logMsg("Minimum  Value to be updated :" + maxLongVal);

			//to set the Long
			cstmt.setObject(1,maxLongVal,java.sql.Types.CHAR);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Char_Query_Name","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			rStringVal= (String) rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rStringVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxStringVal);

			if (rStringVal.trim().equals(maxStringVal.trim()))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.close();
					rs=null;
				}
				if(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject158
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Char_Tab with the minimum value of Char_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject158() throws Fault
	{
		Long minLongVal;
		String rStringVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Char_In_Null(?)}");

			//to extract the Maximum Value to be Updated
			sminStringVal = rsSch.extractVal("Bigint_Tab",2,sqlp,conn);
			String minStringVal = new String(sminStringVal);
			minLongVal = new Long(sminStringVal);
			logMsg("Maximum Value to be updated :" + minLongVal);

			//to set the Value
			cstmt.setObject(1,minLongVal,java.sql.Types.CHAR);

			//execute the procedure
			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("Char_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			rStringVal= (String) rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rStringVal);
			logMsg("Returned Value from ctssql.stmt:"+ minStringVal);

			if (rStringVal.trim().equals(minStringVal.trim()))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 Failed!", e);
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.close();
					rs=null;
				}
				if(cstmt != null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch(Exception e)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject159
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x, int targetSqlType) method,update the
	 *                    column Min_Val of Varchar_Tab with the maximum value of Varchar_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the maximum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject159() throws Fault
	{
		Long maxLongVal;
		String rStringVal;
		String  smaxStringVal	= null;
		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Varchar_In_Name(?)}");

			//to extract the Minimum Value to be Updated
			smaxStringVal = rsSch.extractVal("Bigint_Tab",1,sqlp,conn);
			String maxStringVal = new String(smaxStringVal);
			maxLongVal = new Long(smaxStringVal);
			logMsg("Minimum  Value to be updated :" + maxLongVal);

			//to set the Long
			cstmt.setObject(1,maxLongVal,java.sql.Types.VARCHAR);

			//execute the procedure
			cstmt.executeUpdate();
			//to query from the database to check the call of cstmt.executeUpdate
			//to get the query string
			String Max_Val_Query=sqlp.getProperty("Varchar_Query_Name","");
			logMsg(Max_Val_Query);
			rs=stmt.executeQuery(Max_Val_Query);
			rs.next();
			rStringVal= (String) rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rStringVal);
			logMsg("Returned Value from ctssql.stmt:"+ maxStringVal);

			if (rStringVal.trim().equals(maxStringVal.trim()))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

	/*
	 * @testName:         testSetObject160
	 * @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.
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    Using the setObject(int parameterIndex, Object x,int targetSqlType) method,update the
	 *                    column Null_Val of Varchar_Tab with the minimum value of Varchar_Tab. Call the
	 *                    getObject(int columnno) method to retrieve this value. Extract
	 *                    the minimum value from the ctssql.stmt file. Compare this value
	 *                    with the value returned by the getObject(int columnno) method.
	 *                    Both the values should be equal.
	 */

	public void testSetObject160() throws Fault
	{
		Long minLongVal;
		String rStringVal;
		String  sminStringVal	= null;
		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);
			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Varchar_In_Null(?)}");

			//to extract the Maximum Value to be Updated
			sminStringVal = rsSch.extractVal("Bigint_Tab",2,sqlp,conn);
			String minStringVal = new String(sminStringVal);
			minLongVal = new Long(sminStringVal);
			logMsg("Maximum Value to be updated :" + minLongVal);

			//to set the Value
			cstmt.setObject(1,minLongVal,java.sql.Types.VARCHAR);

			//execute the procedure
			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("Varchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			rStringVal= (String) rs.getObject(1);
			logMsg("Returned Value after Updation:"+ rStringVal);
			logMsg("Returned Value from ctssql.stmt:"+ minStringVal);

			if (rStringVal.trim().equals(minStringVal.trim()))
			{
				logMsg("setObject Method sets the designated parameter value ");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter value ");
				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 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)
			{

			}
		}
	}

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