// CurrLoc.cpp : implementation file
//

#include "stdafx.h"
#include "UDPServ.h"
#include "CurrLoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCurrLoc

IMPLEMENT_DYNAMIC(CCurrLoc, CRecordset)

CCurrLoc::CCurrLoc(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CCurrLoc)
	m_LONGITUDE = 0.0;
	m_VELOCITY = 0.0;
	m_STATE = 0.0;
	m_nVehicleID = 0.0;
	m_sTime = _T("");
	m_LATITUDE = 0.0;
	m_nFields = 7;
	//}}AFX_FIELD_INIT
	m_nDefaultType = dynaset;
}


CString CCurrLoc::GetDefaultConnect()
{
	return _T("ODBC;DSN=Mapping");
}

CString CCurrLoc::GetDefaultSQL()
{
	return _T("[VEHICLE]");
}

void CCurrLoc::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CCurrLoc)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Double(pFX, _T("[LONGITUDE]"), m_LONGITUDE);
	RFX_Double(pFX, _T("[VELOCITY]"), m_VELOCITY);
	RFX_Date(pFX, _T("[DATE]"), m_DATE);
	RFX_Double(pFX, _T("[STATE]"), m_STATE);
	RFX_Double(pFX, _T("[VEHICLE_ID]"), m_nVehicleID);
	RFX_Text(pFX, _T("[TIME]"), m_sTime);
	RFX_Double(pFX, _T("[LATTITUDE]"), m_LATITUDE);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CCurrLoc diagnostics

#ifdef _DEBUG
void CCurrLoc::AssertValid() const
{
	CRecordset::AssertValid();
}

void CCurrLoc::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG
