首页 新闻 会员 周边

VC++ 6.0访问Access数据失败。

0
悬赏园豆:50 [待解决问题]

_RecordsetPtr rst;
sSQL.Format("Select * from ordertab where username='admin'");
rst = m_pConnection->Execute((_bstr_t)sSQL,NULL,adCmdText);
这样可以执行成功。

sSQL.Format("Select * from ordertab where StartTime>'2012-01-01'");
rst = m_pConnection->Execute((_bstr_t)sSQL,NULL,adCmdText);
这样执行不过。数据库为Access数据库,我在sql server中执行:
Select * from ordertab where StartTime>'2012-01-01'
是成功的。是为什么呢,格式有错误吗。StartTime为时间/日期字段。

strangeman的主页 strangeman | 初学一级 | 园豆:124
提问于:2013-04-12 16:35
< >
分享
所有回答(0)
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册