为什么没有人理我? 在OLE DB 开发ACcess 中;发现表或命令对象都打不开,Create(“..”“..”)成功之后,但其中的行集对象为NUL。请问这是怎么回事呢?拜托了。各位大侠指点一下吧。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 long mRowCount=7;CString strCommand=L" SELECT StationName , StationNote FROM MonitorStationTable";CCommand < CAccessor<CStationName> > StationList; if( StationList.Open( m_Session,strCommand,NULL,&mRowCount,DBGUID_DEFAULT,FALSE)!=S_OK){ AfxMessageBox("打开失败!"); StationList.Close(); return FALSE;}if(StationList.Bind()!=S_OK){ AfxMessageBox("Bind Error");}就这样,Bind()不S_OK了。如果在Open()中将最后一个参数设为TRUE,Open()就不会返回S_OK了。请问这是怎么回事呢? 谁来指点一下。 CString strCommand=L" INSERT INTO MonitorStationTable VALUES ( '3','aaa',‘bbb') ";CCommand <CManualAccessor,CNoRowset> StationList; HRESULT hr=StationList.Open( m_Session,strCommand,NULL,&mRowCount,DBGUID_DEFAULT,FALSE);//m_Session已经打开了; if(FAILED(hr)) { AfxMessageBox("Fail"); }为什么会错呢? 想用ActiveX把webBrowser包装一下,一些不懂地方。 文档函数原型和实际有不同 SetRedraw? 线程中的Sleep()问题! 怎样写一个让edit控件显示数据 关于edit控件的一个问题 CEdit对象为什么会自动反选 下面热门问题,大家如何写的代码啊? 一个关于刷卡程序,通过PreTranslateMessage得到所刷出来的字符 VC中的CRect 一个奇怪的现象 ListBox控件的问题
CString strCommand=L" SELECT StationName , StationNote FROM MonitorStationTable";
CCommand < CAccessor<CStationName> > StationList;
if( StationList.Open( m_Session,strCommand,NULL,&mRowCount,DBGUID_DEFAULT,FALSE)!=S_OK)
{
AfxMessageBox("打开失败!");
StationList.Close();
return FALSE;
}if(StationList.Bind()!=S_OK)
{
AfxMessageBox("Bind Error");
}就这样,Bind()不S_OK了。如果在Open()中将最后一个参数设为TRUE,Open()就不会返回S_OK了。
请问这是怎么回事呢?
CString strCommand=L" INSERT INTO MonitorStationTable VALUES ( '3','aaa',‘bbb') ";CCommand <CManualAccessor,CNoRowset> StationList;
HRESULT hr=StationList.Open( m_Session,strCommand,NULL,&mRowCount,DBGUID_DEFAULT,FALSE);
//m_Session已经打开了;
if(FAILED(hr))
{
AfxMessageBox("Fail");
}
为什么会错呢?