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

/*
 * %W% %E%
 */
 
package com.sun.cts.tests.jdbc.ee.prepStmt.prepStmt10;

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 prepStmtClient10 class tests methods of PreparedStatement interface using 
 * Sun's J2EE Reference Implementation.
 * @author  
 * @version 1.8, 11/27/00
 */


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

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

	//Harness requirements 

	private transient Connection conn = null;
	private ResultSet rs=null;
	private Statement stmt=null;
	private DataSource ds1 = null;
	private dbSchema dbSch=null;
	private rsSchema rsSch=null;
	private csSchema csSch=null;
	private String drManager=null;
	private transient DatabaseMetaData dbmd=null;
	private Properties sqlp = null;
	private Properties props = null;
	private PreparedStatement pstmt=null;

	/* Run test in standalone mode */
	public static void main(String[] args) 
	{
		prepStmtClient10 theTests = new prepStmtClient10();
		Status s=theTests.run(args, System.out, System.err);
		s.exit();
	}

	/*  Test setup: */
	/*
	 *   @class.setup_props: Driver, the Driver name;
	 *			db1, the database name with url;
	 *			user1, the database user name;
	 *			password1, the database password;
	 *			db2, the database name with url;
	 *			user2, the database user name;
	 *			password2, the database password;
	 *			DriverManager, flag for DriverManager;
	 *			ptable, the primary table;
	 *			ftable, the foreign table;
	 *			cofSize, the initial size of the ptable;
	 *			cofTypeSize, the initial size of the ftable;
	 *			binarySize, size of binary data type;
	 *			varbinarySize, size of varbinary data type;
	 *			longvarbinarySize, size of longvarbinary data type;
	 *  @class.testArgs:     -ap ctssql.stmt
	 */

	public void setup(String[] args, Properties p) throws Fault
	{
		try 
		{
			try
			{
				drManager = p.getProperty("DriverManager","");
				if(drManager.length() == 0)
					throw new Fault("Invalid DriverManager Name");
				//sqlp = new Properties();
				props = p;
				/*String sqlStmt = p.getProperty("rsQuery","");
				InputStream istr = new FileInputStream(sqlStmt);
				sqlp.load(istr);*/
				sqlp = p;

				if(drManager.equals("yes"))
				{
					logMsg("Using DriverManager");
					DriverManagerConnection dmCon = new DriverManagerConnection();
					conn = dmCon.getConnection(p);
				}
				else
				{
					logMsg("Using DataSource");
					DataSourceConnection dsCon = new DataSourceConnection();
					conn = dsCon.getConnection(p);
				}
				stmt = conn.createStatement();
				dbmd = conn.getMetaData();
				rsSch = new rsSchema();
				csSch = new csSchema();
			}
			catch(SQLException ex)
			{
				logErr("SQL Exception: : " + ex.getMessage());
			}
		}
		catch(Exception e)
		{
			logErr("Setup Failed!");
			TestUtil.printStackTrace(e);
		}
	}



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

	public void testSetObject123() throws Fault
	{
		Float minRealVal = null;
		Integer minIntegerVal = null;
		Float  rRealVal = null;
		String sminStringVal = null;

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

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

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

			minIntegerVal = new Integer(sminStringVal);
			minRealVal = new Float(sminStringVal);
			logMsg("Minimum Real Value: " + minRealVal);

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

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

			Object orRealVal =  rs.getObject(1);
			rRealVal = new Float(orRealVal.toString());
			
			logMsg("Returned Real Value after Updation: " + rRealVal);
			logMsg("Value returned from ctssql.stmt: " + minRealVal);

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

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



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

	public void testSetObject124() throws Fault
	{
		Double maxFloatVal = null;
		Integer maxIntegerVal = null;
		Double rFloatVal = null;
		String smaxStringVal = null;

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

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

			//to extract the Maximum Value of Float to be Updated 
			smaxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);

			maxIntegerVal = new Integer(smaxStringVal);
			maxFloatVal = new Double(smaxStringVal);
			logMsg("Maximum Float Value: " + maxFloatVal);

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

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

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

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

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



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

	public void testSetObject125() throws Fault
	{
		Double minFloatVal = null;
		Integer minIntegerVal = null;
		Double rFloatVal = null;
		String sminStringVal = null;

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

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

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

			minIntegerVal = new Integer(sminStringVal);
			minFloatVal = new Double(sminStringVal);
			logMsg("Minimum Float Value: " + minFloatVal);

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

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

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

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

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



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

	public void testSetObject126() throws Fault
	{
		Double maxDoubleVal = null;
		Integer maxIntegerVal = null;
		Double rDoubleVal = null;
		String smaxStringVal = null;

		try
		{

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

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

			//to extract the Maximum Value of Double to be Updated 
			smaxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);

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

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

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

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

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

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



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

	public void testSetObject127() throws Fault
	{
		Double minDoubleVal = null;
		Integer minIntegerVal = null;
		Double rDoubleVal = null;
		String sminStringVal = null;

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

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

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

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

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

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

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

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



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

	public void testSetObject128() throws Fault
	{
		BigDecimal maxDecimalVal = null;
		BigDecimal rDecimalVal = null;
		Integer maxIntegerVal = null;
		String smaxStringVal = null;

		try
		{

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

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

			//to extract the Maximum Value of Decimal to be Updated 
			smaxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);

			maxIntegerVal = new Integer(smaxStringVal);
			maxDecimalVal = new BigDecimal(smaxStringVal);
			logMsg("Maximum Decimal Value: " + maxDecimalVal);

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

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

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

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

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



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

	public void testSetObject129() throws Fault
	{
		BigDecimal minDecimalVal = null;
		BigDecimal rDecimalVal = null;
		Integer minIntegerVal = null;
		String sminStringVal = null;

		try
		{

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

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

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


			minDecimalVal = new BigDecimal(sminStringVal);
			minIntegerVal = new Integer(sminStringVal);
			logMsg("Minimum Decimal Value: " + minDecimalVal);

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

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

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



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

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

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

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


			maxNumericVal = new BigDecimal(smaxStringVal);
			maxIntegerVal = new Integer(smaxStringVal);
			logMsg("Minimum Float Value: " + maxNumericVal);

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

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

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

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

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



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

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

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

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


			minNumericVal = new BigDecimal(sminStringVal);
			minIntegerVal = new Integer(sminStringVal);

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

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

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

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

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



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

	public void testSetObject132() throws Fault
	{
		Boolean maxBooleanVal = null;
		Boolean rBooleanVal = null;
		String smaxBooleanVal = null;
		Integer maxIntegerVal = null;
		boolean booleanVal;

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

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

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

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

			maxIntegerVal = new Integer(smaxBooleanVal);
			logMsg("Maximum Boolean Value: " + maxBooleanVal);

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

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

			Object orBooleanVal =  rs.getObject(1);
			rBooleanVal = new Boolean(orBooleanVal.toString());
			
			logMsg("Returned Boolean Value after Updation: " + rBooleanVal);
			logMsg("Value returned from ctssql.stmt: " + maxBooleanVal);

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

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



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

	public void testSetObject133() throws Fault
	{
		Boolean minBooleanVal = null;
		Boolean rBooleanVal = null;
		String sminBooleanVal = null;
		Integer minIntegerVal = null;
		boolean booleanVal;

		try
		{

			// to create the Bit Table
			rsSch.createTab("Bit_Tab",sqlp,conn);

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

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

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

			minIntegerVal = new Integer(sminBooleanVal);
			logMsg("Minimum Boolean Value: " + minBooleanVal);

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

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

			Object orBooleanVal =  rs.getObject(1);
			rBooleanVal = new Boolean(orBooleanVal.toString());
			
			logMsg("Returned Boolean Value after Updation: " + rBooleanVal);
			logMsg("Value returned from ctssql.stmt: " + minBooleanVal);

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

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



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

	public void testSetObject134() throws Fault
	{
		String maxStringVal = null;
		String rStringVal = null;
		Integer maxIntegerVal = null;

		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Char_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);
			//to extract the Maximum Value of Integer, to be Updated for NULL value of Char Table  
			maxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			maxStringVal = maxStringVal.trim(); //substring(0,maxStringVal.length());
			maxIntegerVal = new Integer(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

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

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

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



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

		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Char_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);
			//to extract the Minimum Value of Integer, to be Updated for NULL value of Char Table  
			maxStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			maxStringVal = maxStringVal.trim(); //substring(0,maxStringVal.length());
			maxIntegerVal = new Integer(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

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

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

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



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

		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Varchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Maximum Value of Integer, to be Updated for NULL value of Varchar Table   
			maxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			maxStringVal = maxStringVal.trim(); //substring(0,maxStringVal.length());
			maxIntegerVal = new Integer(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

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

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

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



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

		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Varchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);

			//to extract the Minimum Value of Integer, to be Updated for NULL value of Varchar Table  
			maxStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			maxStringVal = maxStringVal.trim(); //substring(0,maxStringVal.length());
			maxIntegerVal = new Integer(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

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

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

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



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

		try
		{
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Longvarchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);
			//to extract the Maximum Value of Integer, to be Updated for NULL value of Longvarchar Table  
			maxStringVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			maxStringVal = maxStringVal.trim(); //substring(0,maxStringVal.length());
			maxIntegerVal = new Integer(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

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

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

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



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

		try
		{
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);
			String sPrepStmt = sqlp.getProperty("Longvarchar_Tab_Null_Update","");
			logMsg("Prepared Statement String: " + sPrepStmt);
			//to extract the Minimum Value of Integer, to be Updated for NULL value of Longvarchar Table   
			maxStringVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			maxStringVal = maxStringVal.trim(); //substring(0,maxStringVal.length());
			maxIntegerVal = new Integer(maxStringVal);
			logMsg("String Value: " + maxStringVal);

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

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

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

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

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



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

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

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

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

			maxLongVal = new Long(smaxStringVal);
			maxIntegerVal = new Integer(smaxStringVal);
			logMsg("Maximum String Value: " + maxIntegerVal);

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

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

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

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

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



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

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

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

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

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

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

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

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

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

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



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

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

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

			//to extract the Maximum Value of Smallint to be Updated 
			smaxStringVal = rsSch.extractVal("Smallint_Tab",1,sqlp,conn);

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

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

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

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

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

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



	/* cleanup */
	public void  cleanup() throws Fault
	{
		try
		{
			if(pstmt != null)
			{
				pstmt.close();
				pstmt = null;
			}
			if(stmt != null)
			{
				stmt.close();
				stmt = null;
			}
			logMsg("Closed all the resources");
			rsSch.dbUnConnect(conn);
			logMsg("Cleanup ok;");
		}
		catch(Exception e)
		{
			logErr("An error occurred while closing the database connection");
		}
	}
}

