/*
*	©Copyright 2002, Microsoft Corporation
*	Written by Sergey Vasilevskiy, 2002-2005.
*/

#include "stdafx.h"

using namespace TPCE;

CTxnHarnessDBBase::CTxnHarnessDBBase(CDBConnection *pDBConn)
: m_pDBConnection(pDBConn)
{
	// Initialize with external connection handles
	//
	m_henv = m_pDBConnection->m_henv;
	m_hdbc = m_pDBConnection->m_hdbc;
	//m_hstmt = m_pDBConnection->m_hstmt;	
}

CTxnHarnessDBBase::~CTxnHarnessDBBase()
{
	// All cleanup work is done in DBConnection destructor
	//
}

void CTxnHarnessDBBase::ThrowError( CODBCERR::ACTION eAction, SQLSMALLINT HandleType, SQLHANDLE Handle, const char* szLoc)
{
	m_pDBConnection->ThrowError(eAction, HandleType, Handle, szLoc);
}

void CTxnHarnessDBBase::StartTransaction(char *szIsoLevel)
{
	m_pDBConnection->StartTransaction(szIsoLevel);
}

void CTxnHarnessDBBase::StartTransactionReadCommitted()
{
	m_pDBConnection->StartTransactionReadCommitted();
}

void CTxnHarnessDBBase::Rollback()
{
	m_pDBConnection->Rollback();
}


void CTxnHarnessDBBase::CommitTransaction()
{
	m_pDBConnection->CommitTransaction();
}