/*
*	©Copyright 2002,2003, Microsoft Corporation
*	Microsoft Confidential.
*	Written by Sergey Vasilevskiy, 2002-2003.
*/
#pragma once

#include "stdafx.h"

class CCustomerPositionDB : public CTxnHarnessDBBase, public TPCE::CCustomerPositionDBInterface
{	
	SQLHSTMT						    m_hstmtFrame1;
	SQLHSTMT						    m_hstmtFrame2;

	TPCE::TCustomerPositionFrame1Input	Frame1Input;
	TPCE::TCustomerPositionFrame1Output	Frame1Output;

	TPCE::TCustomerPositionFrame2Input	Frame2Input;
	TPCE::TCustomerPositionFrame2Output	Frame2Output;

	SQLINTEGER						    m_cust_id_ind;	//indicator variable for Frame 1
    SQLINTEGER						    m_c_ext_1_ind;
    SQLINTEGER						    m_c_ext_2_ind;
    SQLINTEGER						    m_c_ext_3_ind;

	SQLHDESC						    m_descFrame1Col1;
	SQLHDESC						    m_descFrame1Col2;

public:
	CCustomerPositionDB(CDBConnection *pDBConn);
	~CCustomerPositionDB();
	
	void DoCustomerPositionFrame1(  const TPCE::TCustomerPositionFrame1Input*   pFrame1Input, 
                                    TPCE::PCustomerPositionFrame1Output	        pFrame1Output);

	void DoCustomerPositionFrame2(  const TPCE::TCustomerPositionFrame2Input*   pFrame2Input, 
                                    TPCE::PCustomerPositionFrame2Output	        pFrame2Output);

	void DoCustomerPositionFrame3(  );

	// Function to pass any exception thrown inside
	// database class frame implementation
	// back into the database class
	void Cleanup(void* pException);
};
