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

#include "stdafx.h"

class CSecurityDetailDB : public CTxnHarnessDBBase, public TPCE::CSecurityDetailDBInterface
{	
	SQLHSTMT		m_hstmtFrame1;

	TPCE::TSecurityDetailFrame1Input	Frame1Input;
	TPCE::TSecurityDetailFrame1Output	Frame1Output;

	SQLHDESC		m_descFrame1Col1;
	SQLHDESC		m_descFrame1Col2;
	SQLHDESC		m_descFrame1Col3;
	SQLHDESC		m_descFrame1Col4;
	SQLHDESC		m_descFrame1Col4Set2;
	SQLHDESC		m_descFrame1Col5;	

	SQLINTEGER		m_s53w_low_ind;		//indicator variable
	SQLINTEGER		m_s53w_low_date_ind;//indicator variable
	SQLINTEGER		m_s53w_high_ind;	//indicator variable
	SQLINTEGER		m_s53w_high_date_ind;//indicator variable
    SQLINTEGER      m_co_ad_line2_ind;
    SQLINTEGER      m_ex_ad_line2_ind;

	SQLINTEGER		m_len;	//number of fetched rows - bound once for all descriptors

public:
	CSecurityDetailDB(CDBConnection *pDBConn);

	void DoSecurityDetailFrame1(const TPCE::TSecurityDetailFrame1Input* pFrame1Input, 
                                TPCE::PSecurityDetailFrame1Output       pFrame1Output);
	
	// Function to pass any exception thrown inside
	// database class frame implementation
	// back into the database class
	void Cleanup(void* pException);
};
