Jun
May 11th, 1999, 08:14 PM
I'm using ADO - Oracle Provider. I need to Filter the a recordset with a
Date field.
I'd tried the ff. but it does not work.
long nService;
long nDayGroup;
COleDateTime oledtDate;
CString strFilter;
...
strFilter.Format("SERVICE=%ld AND DAY_GROUP=%ld AND
DATE_EFFECTIVE=TO_DATE(\'%s\',\'YYYYMMDD')",
nService, nDayGroup, oledtDate.Format("%Y%m%d"));
m_Ado_Service.GetRecordset().SetFilter(COleVariant(strFilter));
...
When I'd tried to remove the Date Field (i.e DATE_EFFECTIVE) -- it works.
What should I'll do to include the Date field in the Filter?
Thanks.
Date field.
I'd tried the ff. but it does not work.
long nService;
long nDayGroup;
COleDateTime oledtDate;
CString strFilter;
...
strFilter.Format("SERVICE=%ld AND DAY_GROUP=%ld AND
DATE_EFFECTIVE=TO_DATE(\'%s\',\'YYYYMMDD')",
nService, nDayGroup, oledtDate.Format("%Y%m%d"));
m_Ado_Service.GetRecordset().SetFilter(COleVariant(strFilter));
...
When I'd tried to remove the Date Field (i.e DATE_EFFECTIVE) -- it works.
What should I'll do to include the Date field in the Filter?
Thanks.