// dbCursor.cpp : implementation file
|
//
|
|
#include "stdafx.h"
|
#include "mbamdb.h"
|
#include "dbCursor.h"
|
|
|
// CdbCursor
|
|
CdbCursor::CdbCursor()
|
{
|
m_ARecordSet.Close( );
|
|
m_pAConnect = NULL;
|
m_strSQL = _T("");
|
}
|
|
CdbCursor::~CdbCursor()
|
{
|
if(m_pAConnect)
|
m_pAConnect->Release();
|
}
|
|
|
// CdbCursor member functions
|
bool CdbCursor::MoveFirst( )
|
{
|
HRESULT bReturn;
|
|
bReturn = m_ARecordSet.MoveFirst( );
|
if ( S_OK != bReturn )
|
return false;
|
GetData( );
|
return true;
|
}
|
|
bool CdbCursor::MovePrev( )
|
{
|
HRESULT bReturn;
|
|
bReturn = m_ARecordSet.MovePrev( );
|
if ( S_OK != bReturn )
|
return false;
|
|
GetData( );
|
return true;
|
}
|
|
bool CdbCursor::MoveNext( )
|
{
|
HRESULT bReturn;
|
|
bReturn = m_ARecordSet.MoveNext( );
|
if ( S_OK != bReturn )
|
return false;
|
|
GetData( );
|
return true;
|
}
|
|
bool CdbCursor::GetData( )
|
{
|
return true;
|
}
|
|
bool CdbCursor::MoveTo( long nPos )
|
{
|
HRESULT bReturn;
|
|
bReturn = m_ARecordSet.MoveTo( nPos );
|
if ( S_OK != bReturn )
|
return false;
|
|
GetData( );
|
return true;
|
}
|