首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

idispatch error #3079解决思路

2012-03-26 
idispatch error #3079// convert parameter [1/19/2010 Administrator]try{cstrValue.Format(select * f

idispatch error #3079
// convert parameter [1/19/2010 Administrator]
try
{
cstrValue.Format("select * from iptable where( ulStartIPAddr='%d' and ulendIPAddr='%d' and ulAimIPAddr='%d' and achDomain='%s' and achComment='%s');",
struIPinfo.ulStartIPAddr,struIPinfo.ulendIPAddr,struIPinfo.ulAimIPAddr,struIPinfo.achDomain,struIPinfo.achComment);
}
catch (_com_error e)
{
AfxMessageBox(e.ErrorMessage()); 
}
if (m_pRecordSet.Open(m_pBase->GetActiveConnection(),cstrValue))每次运行到这的时候都会出现 
  idispatch error #3079
这是哪里的原因啊

[解决办法]
idispatch error #3079 标准表达式和数据类型不匹配
[解决办法]
ulStartIPAddr=%d and ulendIPAddr=%d and ulAimIPAddr=%d and achDomain='%s' and achComment='%s' 
如果字段为整型,就不应该用单引号!

热点排行