这是我在做毕设时的一段代码:
UpdateData();
CString strSQL;
if(m_newplace.IsEmpty())
{AfxMessageBox("请填上调出去向!");
return;
}
try
{
strSQL.Format("update keep set usePla='"+m_newplace+"' \
where devNo='"+m_no+"'");
db.ExecuteSQL(strSQL);
CTime time=CTime::GetCurrentTime();
CString strchgTime=time.Format("%Y-%m-%d %H:%M:%S");
strSQL.Format("insert into marsh(devNo,chgSource,chgDest,chgTime)\
values('"+devNo+"','"
+chgSource+"','"
+chgDest+"','"
+strchgTime+"')");
db.ExecuteSQL(strSQL);}
catch(...)
{
AfxMessageBox("更新数据表发生错误!");
return;
}
AfxMessageBox("修改成功\r按continue可继续修改!"); 我想给设备调度表marsh插入一条记录,结果编译出了点问题,我把错误贴上来:
MarshDlg.cpp(68) error C2065: 'devNo' : undeclared identifier
MarshDlg.cpp(69) : error C2110: cannot add two pointersMarshDlg.cpp(69) : error C2065: 'chgSource' : undeclared identifier
MarshDlg.cpp(70) : error C2065: 'chgDest' : undeclared identifier
事实上我的这些变量都已在Acess2000的marsh表中定义了,而且我在其他的模块中
插入记录还很正常,不知怎么解决啊,还望高手分析原因,出个点子亦可。
分不够,我可以调度啊!!
UpdateData();
CString strSQL;
if(m_newplace.IsEmpty())
{AfxMessageBox("请填上调出去向!");
return;
}
try
{
strSQL.Format("update keep set usePla='"+m_newplace+"' \
where devNo='"+m_no+"'");
db.ExecuteSQL(strSQL);
CTime time=CTime::GetCurrentTime();
CString strchgTime=time.Format("%Y-%m-%d %H:%M:%S");
strSQL.Format("insert into marsh(devNo,chgSource,chgDest,chgTime)\
values('"+devNo+"','"
+chgSource+"','"
+chgDest+"','"
+strchgTime+"')");
db.ExecuteSQL(strSQL);}
catch(...)
{
AfxMessageBox("更新数据表发生错误!");
return;
}
AfxMessageBox("修改成功\r按continue可继续修改!"); 我想给设备调度表marsh插入一条记录,结果编译出了点问题,我把错误贴上来:
MarshDlg.cpp(68) error C2065: 'devNo' : undeclared identifier
MarshDlg.cpp(69) : error C2110: cannot add two pointersMarshDlg.cpp(69) : error C2065: 'chgSource' : undeclared identifier
MarshDlg.cpp(70) : error C2065: 'chgDest' : undeclared identifier
事实上我的这些变量都已在Acess2000的marsh表中定义了,而且我在其他的模块中
插入记录还很正常,不知怎么解决啊,还望高手分析原因,出个点子亦可。
分不够,我可以调度啊!!
原来是我写错了。