大家来帮看看~关于VC用ado访问数据库,该如何解决

大家来帮看看~~关于VC用ado访问数据库
[code=C/C++] strQuery = " select 用户名,密码 from 登陆 where 用户名='"+m_sUser+"' ";
theApp.ADOExecute(theApp.m_pRecord, strQuery);/code]

以下是函数原型[code=C/C++]bool CSIASBANDApp::ADOExecute(_RecordsetPtr &ADOSet, _variant_t &strSQL) 

if ( ADOSet->State == adStateOpen) ADOSet->Close(); 
try 

ADOSet->Open(strSQL, m_pCon.GetInterfacePtr(), adOpenStatic, adLockOptimistic, 
adCmdUnknown); 
return true; 

catch(_com_error &e) 

CString err; 
err.Format("ADO Error: %s",(char*)e.Description()); 
AfxMessageBox(err); 
return false; 

} /code]

这个函数是不是有问题啊 strQuery = " select 用户名,密码 from 登陆 where 用户名='"+m_sUser+"' "; 这个句strQuery得到什么啊,然后它作为实参 theApp.ADOExecute(theApp.m_pRecord, strQuery)
但是看函数ADOExecute原型 
ADOExecute(_RecordsetPtr &ADOSet, _variant_t &strSQL)
ADOSet->Open(strSQL, m_pCon.GetInterfacePtr(), adOpenStatic, adLockOptimistic, 
adCmdUnknown); 

数据库里面有这个表啊
但是这个程序每次都提示对象么 登陆 无效
我的数据库里面
程序不是我写的 我也是第一次搞这些 百度 谷歌了很久 还是没有解决
请大侠指教下



------解决方案--------------------
友情帮顶,友情帮顶