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

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

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

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

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

	//Harness requirements

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

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


	/*
	 * @testName:         testSetObject01
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set String object
	 *                    for SQL Type CHAR and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    String object that is been set. Compare the result with the extracted
	 *                    value from the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject01() throws Fault
	{
		ResultSet rs =null;
		String oRetVal=null;
		try
		{
			rsSch.createTab("Char_Tab",sqlp,conn);

			String sCoffeeName = rsSch.extractVal("Char_Tab",1,sqlp,conn);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Char_In_Null(?)}");
			cstmt.setObject(1,sCoffeeName);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Char_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (String)rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ sCoffeeName);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.trim().equals(sCoffeeName.trim()))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed !");
			}

		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception " + sqle.getMessage());
			throw new Fault("Call to setObject method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Char_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject02
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set String object
	 *                    for SQL Type VARCHAR and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column).  It should return a
	 *                    String object that is been set.  Compare the result with the extracted
	 *                    value from the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject02() throws Fault
	{
		ResultSet rs =null;
		String oRetVal=null;
		try
		{
			rsSch.createTab("Varchar_Tab",sqlp,conn);

			String sCoffeeName = rsSch.extractVal("Varchar_Tab",1,sqlp,conn);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Varchar_In_Null(?)}");
			cstmt.setObject(1,sCoffeeName);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Varchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (String)rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ sCoffeeName);
			logMsg("Returned Value from database:"+ oRetVal);

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


	/*
	 * @testName:         testSetObject03
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set String object
	 *                    for SQL Type LONGVARCHAR and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column).  It should return a
	 *                    String object that is been set.  Compare the result with the
	 *                    extracted value from ctssql.stmt file.  Both the values should be
	 *                    equal.
	 *
	 */
	public void testSetObject03() throws Fault
	{
		ResultSet rs =null;
		String oRetVal=null;
		try
		{
			rsSch.createTab("Longvarcharnull_Tab",sqlp,conn);

			String sCoffeeName = rsSch.extractVal("Longvarchar_Tab",1,sqlp,conn);
			sCoffeeName = sCoffeeName.trim();

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Longvarchar_In_Null(?)}");
			cstmt.setObject(1,sCoffeeName);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Longvarchar_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (String)rs.getObject(1);
			oRetVal = oRetVal.trim();
			logMsg("Returned Value from ctssql.stmt:"+ sCoffeeName);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.equals(sCoffeeName))
			{
				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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Longvarcharnull_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject04
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set BigDecimal
	 *                    object for SQL Type Numeric and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return
	 *                    a BigDecimal object.  Compare the returned value with the extracted
	 *                    value from ctssql.stmt file. Both the values should be equal.
	 *
	 */
	public void testSetObject04() throws Fault
	{
		ResultSet rs =null;
		BigDecimal oRetVal=null;
		try
		{
			rsSch.createTab("Numeric_Tab",sqlp,conn);

			String sMaxBigDecimalVal = rsSch.extractVal("Numeric_Tab",2,sqlp,conn);
			BigDecimal maxBigDecimal = new BigDecimal(sMaxBigDecimalVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Numeric_In_Max(?)}");
			cstmt.setObject(1,maxBigDecimal);
			//execute the procedure
			cstmt.executeUpdate();

			String Min_Val_Query=sqlp.getProperty("Numeric_Query_Max","");
			logMsg(Min_Val_Query);
			rs=stmt.executeQuery(Min_Val_Query);
			rs.next();
			oRetVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ maxBigDecimal);
			logMsg("Returned Value from database:"+ oRetVal);

			if ( (oRetVal.compareTo(maxBigDecimal)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject05
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set BigDecimal
	 *                    object for SQL Type Numeric and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column) method. It should
	 *                    return a BigDecimal object.  Compare the result with the extracted
	 *                    value from the ctssql.stmt file. Both the values should be equal.
	 *
	 */
	public void testSetObject05() throws Fault
	{
		ResultSet rs =null;
		BigDecimal oRetVal=null;
		try
		{
			rsSch.createTab("Numeric_Tab",sqlp,conn);

			String sMinBigDecimalVal = rsSch.extractVal("Numeric_Tab",2,sqlp,conn);
			BigDecimal minBigDecimal = new BigDecimal(sMinBigDecimalVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Numeric_In_Null(?)}");
			cstmt.setObject(1,minBigDecimal);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Numeric_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ minBigDecimal);
			logMsg("Returned Value from database:"+ oRetVal);

			if ( (oRetVal.compareTo(minBigDecimal)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Numeric_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject06
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set BigDecimal
	 *                    object for SQL Type Decimal and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column).  It should return
	 *                    a BigDecimal object.  Compare the returned value with the value
	 *                    extracted from the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject06() throws Fault
	{
		ResultSet rs =null;
		BigDecimal oRetVal=null;
		try
		{
			rsSch.createTab("Decimal_Tab",sqlp,conn);

			String sMaxBigDecimalVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);
			BigDecimal maxBigDecimal = new BigDecimal(sMaxBigDecimalVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Decimal_In_Max(?)}");
			cstmt.setObject(1,maxBigDecimal);
			//execute the procedure
			cstmt.executeUpdate();

			String Min_Val_Query=sqlp.getProperty("Decimal_Query_Max","");
			logMsg(Min_Val_Query);
			rs=stmt.executeQuery(Min_Val_Query);
			rs.next();
			oRetVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ maxBigDecimal);
			logMsg("Returned Value from database:"+ oRetVal);

			if ( (oRetVal.compareTo(maxBigDecimal)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Decimal_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject07
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set BigDecimal
	 *                    object for SQL Type Decimal and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    BigDecimal object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject07() throws Fault
	{
		ResultSet rs =null;
		BigDecimal oRetVal=null;
		try
		{
			rsSch.createTab("Decimal_Tab",sqlp,conn);

			String sMinBigDecimalVal = rsSch.extractVal("Decimal_Tab",2,sqlp,conn);
			BigDecimal minBigDecimal = new BigDecimal(sMinBigDecimalVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Decimal_In_Null(?)}");
			cstmt.setObject(1,minBigDecimal);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Decimal_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (BigDecimal) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ minBigDecimal);
			logMsg("Returned Value from database:"+ oRetVal);

			if ( (oRetVal.compareTo(minBigDecimal)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Decimal_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject08
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Boolean
	 *                    object for SQL Type Bit and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Boolean object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject08() throws Fault
	{
		ResultSet rs =null;
		Boolean oRetVal=null;
		try
		{
			rsSch.createTab("Bit_Tab",sqlp,conn);

			String sMaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn);
			Boolean maxBoolean = new Boolean(sMaxBooleanVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bit_In_Min(?)}");
			cstmt.setObject(1,maxBoolean);
			//execute the procedure
			cstmt.executeUpdate();

			String Min_Val_Query=sqlp.getProperty("Bit_Query_Min","");
			logMsg(Min_Val_Query);
			rs=stmt.executeQuery(Min_Val_Query);
			rs.next();
			oRetVal = (Boolean) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ maxBoolean);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.equals(maxBoolean))
			{
				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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bit_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject09
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Boolean
	 *                    object for SQL Type Bit and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Boolean object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject09() throws Fault
	{
		ResultSet rs =null;
		Boolean oRetVal=null;
		try
		{
			rsSch.createTab("Bit_Tab",sqlp,conn);

			String sMinBooleanVal = rsSch.extractVal("Bit_Tab",2,sqlp,conn);
			Boolean minBoolean = new Boolean(sMinBooleanVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bit_In_Null(?)}");
			cstmt.setObject(1,minBoolean);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Bit_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (Boolean) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ minBoolean);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.equals(minBoolean))
			{
				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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bit_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject10
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Integer
	 *                    object for SQL Type Integer and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Integer object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject10() throws Fault
	{
		ResultSet rs =null;
		Integer oRetVal=null;
		try
		{
			rsSch.createTab("Integer_Tab",sqlp,conn);

			String sMaxIntegerVal = rsSch.extractVal("Integer_Tab",1,sqlp,conn);
			Integer maxInteger = new Integer(sMaxIntegerVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Integer_In_Min(?)}");
			cstmt.setObject(1,maxInteger);
			//execute the procedure
			cstmt.executeUpdate();

			String Min_Val_Query=sqlp.getProperty("Integer_Query_Min","");
			logMsg(Min_Val_Query);
			rs=stmt.executeQuery(Min_Val_Query);
			rs.next();
			Object objRetVal = rs.getObject(1);
			oRetVal = new Integer(objRetVal.toString());
			logMsg("Returned Value from ctssql.stmt:"+ maxInteger);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.compareTo(maxInteger)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Integer_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject11
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Integer
	 *                    object for SQL Type Integer and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Integer object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject11() throws Fault
	{
		ResultSet rs =null;
		Integer oRetVal=null;
		try
		{
			rsSch.createTab("Integer_Tab",sqlp,conn);

			String sMinIntegerVal = rsSch.extractVal("Integer_Tab",2,sqlp,conn);
			Integer minInteger = new Integer(sMinIntegerVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Integer_In_Null(?)}");
			cstmt.setObject(1,minInteger);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Integer_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			Object objRetVal = rs.getObject(1);
			oRetVal = new Integer(objRetVal.toString());
			logMsg("Returned Value from ctssql.stmt:"+ minInteger);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.compareTo(minInteger)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Integer_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject12
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Long
	 *                    object for SQL Type Bigint and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Long object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject12() throws Fault
	{
		ResultSet rs =null;
		Long oRetVal=null;
		try
		{
			rsSch.createTab("Bigint_Tab",sqlp,conn);

			String sMaxLongVal = rsSch.extractVal("Bigint_Tab",1,sqlp,conn);
			Long maxLong = new Long(sMaxLongVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bigint_In_Min(?)}");
			cstmt.setObject(1,maxLong);
			//execute the procedure
			cstmt.executeUpdate();

			String Min_Val_Query=sqlp.getProperty("Bigint_Query_Min","");
			logMsg(Min_Val_Query);
			rs=stmt.executeQuery(Min_Val_Query);
			rs.next();
			Object objRetVal = rs.getObject(1);
			oRetVal = new Long(objRetVal.toString());
			logMsg("Returned Value from ctssql.stmt:"+ maxLong);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.compareTo(maxLong)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bigint_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject13
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Long
	 *                    object for SQL Type Bigint and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Long object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject13() throws Fault
	{
		ResultSet rs =null;
		Long oRetVal=null;
		try
		{
			rsSch.createTab("Bigint_Tab",sqlp,conn);

			String sMinLongVal = rsSch.extractVal("Bigint_Tab",2,sqlp,conn);
			Long minLong = new Long(sMinLongVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Bigint_In_Null(?)}");
			cstmt.setObject(1,minLong);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Bigint_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			Object objRetVal = rs.getObject(1);
			oRetVal = new Long(objRetVal.toString());
			logMsg("Returned Value from ctssql.stmt:"+ minLong);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.compareTo(minLong)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Bigint_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject14
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Double
	 *                    object for SQL Type Double and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Double object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject14() throws Fault
	{
		ResultSet rs =null;
		Double oRetVal=null;
		try
		{
			rsSch.createTab("Double_Tab",sqlp,conn);

			String sMaxDoubleVal = rsSch.extractVal("Double_Tab",1,sqlp,conn);
			Double maxDouble = new Double(sMaxDoubleVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Double_In_Min(?)}");
			cstmt.setObject(1,maxDouble);
			//execute the procedure
			cstmt.executeUpdate();

			String Min_Val_Query=sqlp.getProperty("Double_Query_Min","");
			logMsg(Min_Val_Query);
			rs=stmt.executeQuery(Min_Val_Query);
			rs.next();
			oRetVal = (Double) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ maxDouble);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.equals(maxDouble))
			{
				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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Double_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject15
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Double
	 *                    object for SQL Type Double and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Double object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject15() throws Fault
	{
		ResultSet rs =null;
		Double oRetVal=null;
		try
		{
			rsSch.createTab("Double_Tab",sqlp,conn);

			String sMinDoubleVal = rsSch.extractVal("Double_Tab",2,sqlp,conn);
			Double minDouble = new Double(sMinDoubleVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Double_In_Null(?)}");
			cstmt.setObject(1,minDouble);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Double_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (Double) rs.getObject(1);
			logMsg("Returned Value from ctssql.stmt:"+ minDouble);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.equals(minDouble))
			{
				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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Double_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject16
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Double
	 *                    object for SQL Type Float and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Double object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject16() throws Fault
	{
		ResultSet rs =null;
		Float oRetVal=null;
		try
		{
			rsSch.createTab("Float_Tab",sqlp,conn);

			String sMaxFloatVal = rsSch.extractVal("Float_Tab",1,sqlp,conn);
			Float maxFloat = new Float(sMaxFloatVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Float_In_Min(?)}");
			cstmt.setObject(1,maxFloat);
			//execute the procedure
			cstmt.executeUpdate();

			String Min_Val_Query=sqlp.getProperty("Float_Query_Min","");
			logMsg(Min_Val_Query);
			rs=stmt.executeQuery(Min_Val_Query);
			rs.next();
			Object objRetVal = rs.getObject(1);
			oRetVal = new Float(objRetVal.toString());
			logMsg("Returned Value from ctssql.stmt:"+ maxFloat);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.compareTo(maxFloat)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Float_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject17
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Float
	 *                    object for SQL Type Float and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Float object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject17() throws Fault
	{
		ResultSet rs =null;
		Float oRetVal=null;
		try
		{
			rsSch.createTab("Float_Tab",sqlp,conn);

			String sMinFloatVal = rsSch.extractVal("Float_Tab",2,sqlp,conn);
			Float minFloat = new Float(sMinFloatVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Float_In_Null(?)}");
			cstmt.setObject(1,minFloat);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Float_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			Object objRetVal = rs.getObject(1);
			oRetVal = new Float(objRetVal.toString());
			logMsg("Returned Value from ctssql.stmt:"+ minFloat);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.compareTo(minFloat)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Float_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject18
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Date
	 *                    object for SQL Type Date and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Date object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject18() throws Fault
	{
		ResultSet rs =null;
		java.sql.Date oRetVal=null;
		java.sql.Date mfgDateVal=null;

		try
		{
			rsSch.createTab("Date_Tab",sqlp,conn);

			String sMfgDateVal = rsSch.extractVal("Date_Tab",1,sqlp,conn);
			sMfgDateVal=sMfgDateVal.substring(sMfgDateVal.indexOf('\'')+1,sMfgDateVal.lastIndexOf('\''));
			mfgDateVal = java.sql.Date.valueOf(sMfgDateVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Date_In_Null(?)}");
			cstmt.setObject(1,mfgDateVal);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Date_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			java.util.Date objRetVal = (java.util.Date) rs.getObject(1);
			long lDate = objRetVal.getTime();
			oRetVal = new java.sql.Date(lDate);
			
			logMsg("Returned Value from ctssql.stmt:"+ mfgDateVal);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.compareTo(mfgDateVal)==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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Date_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject19
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
 	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Time
	 *                    object for SQL Type Time and call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Time object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject19() throws Fault
	{
		ResultSet rs =null;
		java.sql.Time oRetVal=null;
		java.sql.Time brkTimeVal=null;

		try
		{
			rsSch.createTab("Time_Tab",sqlp,conn);


			String sBrkTimeVal = rsSch.extractVal("Time_Tab",1,sqlp,conn);
			sBrkTimeVal=sBrkTimeVal.substring(sBrkTimeVal.indexOf('\'')+1,sBrkTimeVal.lastIndexOf('\''));
			brkTimeVal=Time.valueOf(sBrkTimeVal);		

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Time_In_Null(?)}");
			cstmt.setObject(1,brkTimeVal);
			//execute the procedure
			cstmt.executeUpdate();
			
			String Null_Val_Query=sqlp.getProperty("Time_Query_Null","");
			logMsg(Null_Val_Query);
			Thread.sleep(5000);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			java.util.Date objRetVal = (java.util.Date) rs.getObject(1);
			long lDate = objRetVal.getTime();
			oRetVal = new java.sql.Time(lDate);
			
			logMsg("Returned Value from ctssql.stmt:"+ brkTimeVal);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.toString().trim().equals(brkTimeVal.toString().trim()))
			{
				logMsg("setObject Method sets the designated parameter with the Object");
			}
			else
			{
				logErr("setObject Method does not set the designated parameter with the Object");
				throw new Fault("Call to setObject Method is Failed !");
			}

		}
		catch(SQLException sqle)
		{
			logErr("SQL Exception " + sqle.getMessage());
			throw new Fault("Call to setObject method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}				
				rsSch.dropTab("Time_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


	/*
	 * @testName:         testSetObject20
	 * @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) method sets the value
	 *                    of the designated parameter using the given object. The second
	 *                    parameter must be of type Object; therefore, the java.lang equivalent
	 *                    objects should be used for built-in types. The JDBC specification
	 *                    specifies a standard mapping from Java Object types to SQL types.
	 *                    The given argument will be converted to the corresponding SQL type
	 *                    before being sent to the database. (See JDK 1.2.2 API specification)
	 *
	 * @test_Strategy:    Get a CallableStatement object from the connection to the database.
	 *                    execute the stored procedure and call the
	 *                    setObject(int parameterIndex, Object x) method to set Timestamp
	 *                    object for SQL Type Timestamp & call statement.executeQuery(String sql)
	 *                    method and call ResultSet.getObject(int column). It should return a
	 *                    Timestamp object.  Compare the result with the extracted value from
	 *                    the ctssql.stmt file.  Both the values should be equal.
	 *
	 */
	public void testSetObject20() throws Fault
	{
		ResultSet rs =null;
		java.sql.Timestamp oRetVal=null;
		java.sql.Timestamp inTimeVal=null;

		try
		{
			rsSch.createTab("Timestamp_Tab",sqlp,conn);


			//to extract the Value of Timestamp to be Updated
			String sInTimeVal = rsSch.extractVal("Timestamp_Tab",1,sqlp,conn);
			sInTimeVal=sInTimeVal.substring(sInTimeVal.indexOf('\'')+1,sInTimeVal.lastIndexOf('\''));
			logMsg("Timestamp Value :" + sInTimeVal);

			// to convert String value into java.sql.Timestamp
			inTimeVal = inTimeVal.valueOf(sInTimeVal);

			// get the CallableStatement object
			cstmt = conn.prepareCall("{call Timestamp_In_Null(?)}");
			cstmt.setObject(1,inTimeVal);
			//execute the procedure
			cstmt.executeUpdate();

			String Null_Val_Query=sqlp.getProperty("Timestamp_Query_Null","");
			logMsg(Null_Val_Query);
			rs=stmt.executeQuery(Null_Val_Query);
			rs.next();
			oRetVal = (java.sql.Timestamp) rs.getObject(1);
			
			logMsg("Returned Value from ctssql.stmt:"+ inTimeVal);
			logMsg("Returned Value from database:"+ oRetVal);

			if (oRetVal.equals(inTimeVal))
			{
				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 method is Failed!");
		}
		catch ( Exception e )
		{
			logErr("Unexpected Exception " + e.getMessage());
			throw new Fault("Call to setObject method is Failed!", e);
		}
		finally
		{
			try
			{
				if(rs!=null)
				{
					rs.close();
					rs=null;
				}
				if(stmt!=null)
				{
					stmt.close();
					stmt=null;
				}
				if(cstmt!=null)
				{
					cstmt.close();
					cstmt=null;
				}
				rsSch.dropTab("Timestamp_Tab",conn);
			}
			catch (Exception e) {}
		}
	}


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