431 lines
10 KiB
C++
431 lines
10 KiB
C++
|
|
#include "StdAfx.h"
|
|||
|
|
#include "DataBaseAide.h"
|
|||
|
|
#include "DataBase.h"
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>캯<EFBFBD><ECBAAF>
|
|||
|
|
CDataBaseAide::CDataBaseAide(IUnknownEx * pIUnknownEx)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
CDataBaseAide::~CDataBaseAide()
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDataBaseAide::SetDataBase(IUnknownEx *pIUnKnownEx)
|
|||
|
|
{
|
|||
|
|
m_pIDataBase = (IDataBase *)pIUnKnownEx;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
return true;
|
|||
|
|
else
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
VOID *CDataBaseAide::GetDataBase(REFGUID Guid, DWORD dwQueryVer)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
return m_pIDataBase;
|
|||
|
|
return NULL;
|
|||
|
|
}
|
|||
|
|
/////////////////////////////////
|
|||
|
|
////ȡ<><C8A1><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
INT CDataBaseAide::GetValue_INT(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
INT nValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, nValue);
|
|||
|
|
return nValue;
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
UINT CDataBaseAide::GetValue_UINT(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
UINT ulValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, ulValue);
|
|||
|
|
return ulValue;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DOUBLE CDataBaseAide::GetValue_DOUBLE(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
DOUBLE dbValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, dbValue);
|
|||
|
|
return dbValue;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
BYTE CDataBaseAide::GetValue_BYTE(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
BYTE bValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, bValue);
|
|||
|
|
return bValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
LONG CDataBaseAide::GetValue_LONG(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
LONG lValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, lValue);
|
|||
|
|
return lValue;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
WORD CDataBaseAide::GetValue_WORD(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
WORD wValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, wValue);
|
|||
|
|
return wValue;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DWORD CDataBaseAide::GetValue_DWORD(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
DWORD ulValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, ulValue);
|
|||
|
|
return ulValue;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
FLOAT CDataBaseAide::GetValue_FLOAT(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
return (FLOAT)GetValue_DOUBLE(pszItem);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//LONGLONG CDataBaseAide::GetValue_LONGLONG(LPCTSTR pszItem)
|
|||
|
|
LONG CDataBaseAide::GetValue_LONGLONG(LPCTSTR pszItem)
|
|||
|
|
{
|
|||
|
|
LONG llValue;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, llValue);
|
|||
|
|
return llValue;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
VOID CDataBaseAide::GetValue_VarValue(LPCTSTR pszItem, CDBVarValue & DBVarValue)
|
|||
|
|
{
|
|||
|
|
ASSERT(FALSE);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
VOID CDataBaseAide::GetValue_SystemTime(LPCTSTR pszItem, SYSTEMTIME & SystemTime)
|
|||
|
|
{
|
|||
|
|
COleDateTime Time;
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, Time);
|
|||
|
|
Time.GetAsSystemTime(SystemTime);
|
|||
|
|
}
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::GetParameter(LPCTSTR pszItem, CDBVarValue & DBVarValue)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetParameter(pszItem, DBVarValue);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::GetParameter(LPCTSTR pszItem, LPSTR pszString, UINT uSize)
|
|||
|
|
{
|
|||
|
|
ASSERT(pszString!=NULL);
|
|||
|
|
|
|||
|
|
if (m_pIDataBase != NULL && pszString != NULL)
|
|||
|
|
{
|
|||
|
|
CDBVarValue DBVarValue;
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetParameter(pszItem, DBVarValue);
|
|||
|
|
lstrcpynA(pszString, (LPCSTR)_bstr_t(DBVarValue), uSize);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::GetParameter(LPCTSTR pszItem, LPWSTR pszString, UINT uSize)
|
|||
|
|
{
|
|||
|
|
ASSERT(pszString!=NULL);
|
|||
|
|
|
|||
|
|
if (m_pIDataBase != NULL && pszString != NULL)
|
|||
|
|
{
|
|||
|
|
CDBVarValue DBVarValue;
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetParameter(pszItem, DBVarValue);
|
|||
|
|
lstrcpynW(pszString, (LPCWSTR)_bstr_t(DBVarValue), uSize);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::ResetParameter()
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->ClearParameters();
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(TEXT("RETURN_VALUE"), adInteger, adParamReturnValue, sizeof(long), _variant_t((long)0));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD>ַ<EFBFBD>
|
|||
|
|
VOID CDataBaseAide::GetValue_String(LPCTSTR pszItem, LPSTR pszString, UINT uMaxCount)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, pszString, uMaxCount);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD>ַ<EFBFBD>
|
|||
|
|
VOID CDataBaseAide::GetValue_String(LPCTSTR pszItem, LPWSTR pszString, UINT uMaxCount)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem, pszString, uMaxCount);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|||
|
|
LONG CDataBaseAide::GetReturnValue()
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetReturnValue();
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD>
|
|||
|
|
LONG CDataBaseAide::ExecuteProcess(LPCTSTR pszSPName, bool bRecordset)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->ExecuteProcess(pszSPName, bRecordset);
|
|||
|
|
return ((CDataBase*)m_pIDataBase)->GetReturnValue();
|
|||
|
|
}
|
|||
|
|
return -1;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, INT nValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adInteger, adParamInput, sizeof(int), _variant_t((int)nValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, BYTE * pData,ULONG lSize, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
SAFEARRAYBOUND SafeArrayBound;
|
|||
|
|
ZeroMemory(&SafeArrayBound,sizeof(SafeArrayBound));
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD>
|
|||
|
|
SafeArrayBound.lLbound=0L;
|
|||
|
|
SafeArrayBound.cElements=lSize;
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
SAFEARRAY * pSafeArray=SafeArrayCreate(VT_UI1,1,&SafeArrayBound);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
for (LONG nIndex=0;nIndex<(LONG)lSize;nIndex++)
|
|||
|
|
{
|
|||
|
|
SafeArrayPutElement(pSafeArray,&nIndex,pData+nIndex);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD>
|
|||
|
|
VARIANT VarChunk;
|
|||
|
|
VariantClear(&VarChunk);
|
|||
|
|
VarChunk.parray=pSafeArray;
|
|||
|
|
VarChunk.vt=VT_ARRAY|VT_UI1;
|
|||
|
|
|
|||
|
|
m_pIDataBase->AddParameter(pszItem,adLongVarBinary,adParamInput,lSize,CDBVarValue(VarChunk));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|||
|
|
void CDataBaseAide::GetParameter(LPCTSTR pszItem, BYTE* szBuffer, UINT& uSize)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->GetFieldValue(pszItem,szBuffer,uSize);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
VOID CDataBaseAide::GetParameter(LPCTSTR lpFieldName, DataStream& kDataStream)
|
|||
|
|
{
|
|||
|
|
static BYTE s_TempData[MAX_ASYNCHRONISM_DATA];
|
|||
|
|
UINT uGetSize = MAX_ASYNCHRONISM_DATA;
|
|||
|
|
GetParameter(lpFieldName,s_TempData,uGetSize);
|
|||
|
|
if (uGetSize != MAX_ASYNCHRONISM_DATA && uGetSize > 0)
|
|||
|
|
{
|
|||
|
|
kDataStream.pushValue((char*)s_TempData,uGetSize);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, UINT uValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adUnsignedInt, adParamInput, sizeof(unsigned int), _variant_t((unsigned int)uValue));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, LONG lValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adInteger, adParamInput, sizeof(long), _variant_t((long)lValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, LONGLONG lValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adBigInt, adParamInput, sizeof(__int64), _variant_t((__int64)lValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, BYTE cbValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adTinyInt, adParamInput, sizeof(BYTE), _variant_t((BYTE)cbValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, WORD wValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adUnsignedSmallInt, adParamInput, sizeof(unsigned short), _variant_t((unsigned short)wValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, DWORD dwValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adUnsignedInt, adParamInput, sizeof(unsigned long), _variant_t((unsigned long)dwValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, FLOAT fValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adSingle, adParamInput, sizeof(float), _variant_t((float)fValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, DOUBLE dValue, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adDouble, adParamInput, sizeof(double), _variant_t((double)dValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, LPCSTR pszString, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
if (lstrlenA(pszString) != 0)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adChar, adParamInput, lstrlenA(pszString), _variant_t(pszString));
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adChar, adParamInput, lstrlenA(pszString) + 1, _variant_t(pszString));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, LPCWSTR pszString, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
if (lstrlenW(pszString) != 0)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adWChar, adParamInput, lstrlenW(pszString), _variant_t(pszString));
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adWChar, adParamInput, lstrlenW(pszString) + 1, _variant_t(pszString));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameter(LPCTSTR pszItem, SYSTEMTIME & SystemTime, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
DOUBLE dbValue = 0.0;
|
|||
|
|
SystemTimeToVariantTime(&SystemTime, &dbValue);
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adDBDate, adParamInput, sizeof(DATE), _variant_t((DATE)dbValue));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameterOutput(LPCTSTR pszItem, LPSTR pszString, UINT uSize, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adVarChar, ParameterDirection, uSize, _variant_t(pszString));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
VOID CDataBaseAide::AddParameterOutput(LPCTSTR pszItem, LPWSTR pszString, UINT uSize, ParameterDirectionEnum ParameterDirection)
|
|||
|
|
{
|
|||
|
|
if (m_pIDataBase != NULL)
|
|||
|
|
{
|
|||
|
|
((CDataBase*)m_pIDataBase)->AddParameter(pszItem, adVarWChar, ParameterDirection, uSize, _variant_t(pszString));
|
|||
|
|
}
|
|||
|
|
}
|