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'
如果字段为整型,就不应该用单引号!