I use ADO to connect to database. I connect successfully. But when I run my application with Windows there's an error :
Debug error :
This application has requested the Runtime to terminate it in an unusual way
Some one plz explain for me & give me a solution

Here is a part of my code:

iSize = 0;
DateTimeNote Temp;
bool bFlag = true;
Open("Provider=Microsoft.Jet.OLEDB.4.0; \
Data Source=DateNote.mdb");
CString sql;
variant_t vNull;
variant_t TheValue;

vNull.vt = VT_ERROR;
vNull.scode = DISP_E_PARAMNOTFOUND;
CString StrResult;
CString StrSql;
CString StrDateTime;
CString StrDateTimeTemp;

StrDateTime.Format(_T("%i/%i/%i"),DateTime.GetMonth(),DateTime.GetDay(),DateTime.GetYear());
StrSql.Format(_T("SELECT * FROM DATETIMENOTE WHERE NGAY = '%s'"), StrDateTime);

m_pRecordset.CreateInstance(__uuidof(Recordset));
m_pRecordset->PutRefActiveConnection(m_pConnection);
m_pRecordset->Open(_variant_t(StrSql), vNull, adOpenForwardOnly, adLockOptimistic, adCmdText);

while (!m_pRecordset->GetEndOfFile())
{
TheValue = m_pRecordset->GetCollect("GIO");
if(TheValue.vt != VT_NULL)
{
StrResult = (char *)_bstr_t(TheValue);
StrDateTimeTemp = StrDateTime + _T(" ") + StrResult;
Temp.DateTime.ParseDateTime(StrDateTimeTemp, LOCALE_NOUSEROVERRIDE, LANG_USER_DEFAULT);
}
TheValue = m_pRecordset->GetCollect("NOTE");
if(TheValue.vt != VT_NULL)
{
StrResult = (char *)_bstr_t(TheValue);
Temp.Note = StrResult;
}
pTemp[iSize] = Temp;
iSize ++;
m_pRecordset->MoveNext();
}