try
{
CString s;
COleDateTime start(2010,1,1,0,0,0);
s = start.Format("%Y-%m-%d %H:%M:%S");
strsql.Format("select * from FileInfo where StartTime>=#%s# ",s);
rsFile->Open(_variant_t(strsql),(IDispatch *)G_ConnFile,adOpenKeyset,adLockOptimistic,adCmdText);
}
catch (_com_error &e)
{
TRACE("Description:%s\n",(LPCTSTR)_bstr_t(e.Description()));
}
catch (...)
{
}
打开时错误.我的数据库是Access,StartTime是日期/时间类型.
{
CString s;
COleDateTime start(2010,1,1,0,0,0);
s = start.Format("%Y-%m-%d %H:%M:%S");
strsql.Format("select * from FileInfo where StartTime>=#%s# ",s);
rsFile->Open(_variant_t(strsql),(IDispatch *)G_ConnFile,adOpenKeyset,adLockOptimistic,adCmdText);
}
catch (_com_error &e)
{
TRACE("Description:%s\n",(LPCTSTR)_bstr_t(e.Description()));
}
catch (...)
{
}
打开时错误.我的数据库是Access,StartTime是日期/时间类型.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货