bcb+access中为啥老是弹出提示:W8060 Possibly incorrect assignment
各位老师,我现在搞了一个程序,编译可以通过,但老是弹出警告:[C++ Warning] Unit1.cpp(477): W8060 Possibly incorrect assignment。具体程序如下:
AnsiString tmp1,mysql,tmp2=0;
unsigned short Year;
unsigned short Month;
unsigned short Day;
TDateTime DT;
ADOQuery1->Open();
ADOQuery1->Insert();
ADOQuery1->FieldByName("时间")->Value=Now();
ADOQuery1->FieldByName("母线A相电流值")->Value=temp1;
ADOQuery1->FieldByName("母线B相电流值")->Value=temp2;
ADOQuery1->FieldByName("母线C相电流值")->Value=temp3;
ADOQuery1->FieldByName("补偿回路A相电流值")->Value=temp4;
ADOQuery1->FieldByName("补偿回路B相电流值")->Value=temp5;
ADOQuery1->FieldByName("补偿回路C相电流值")->Value=temp6;
ADOQuery1->FieldByName("母线A相电压值")->Value=temp7;
ADOQuery1->FieldByName("母线B相电压值")->Value=temp8;
ADOQuery1->FieldByName("母线C相电压值")->Value=temp9;
ADOQuery1->FieldByName("补偿回路报警A相电流值")->Value=temp17;
ADOQuery1->FieldByName("补偿回路报警B相电流值")->Value=temp18;
ADOQuery1->FieldByName("补偿回路报警C相电流值")->Value=temp19;
ADOQuery1->Post();
tmp1=Now();
DT=StrToDateTime(tmp1);
DT.DecodeDate(&Year,&Month,&Day);
if(Month=1)mysql="delete from UI where 时间 like '%"+IntToStr(Year-1)+"-7%'";
if(Month=2)mysql="delete from UI where 时间 like '%"+IntToStr(Year-1)+"-8%'";
if(Month=3)mysql="delete from UI where 时间 like '%"+IntToStr(Year-1)+"-9%'";
if(Month=4)mysql="delete from UI where 时间 like '%"+IntToStr(Year-1)+"-10%'";
if(Month=5)mysql="delete from UI where 时间 like '%"+IntToStr(Year-1)+"-11%'";
if(Month=6)mysql="delete from UI where 时间 like '%"+IntToStr(Year-1)+"-12%'";
if(Month=7)mysql="delete from UI where 时间 like '%"+IntToStr(Year)+"-1%'";
if(Month=8)mysql="delete from UI where 时间 like '%"+IntToStr(Year)+"-2%'";
if(Month=9)mysql="delete from UI where 时间 like '%"+IntToStr(Year)+"-3%'";
if(Month=10)mysql="delete from UI where 时间 like '%"+IntToStr(Year)+"-4%'";
if(Month=11)mysql="delete from UI where 时间 like '%"+IntToStr(Year)+"-5%'";
if(Month=12)mysql="delete from UI where 时间 like '%"+IntToStr(Year)+"-6%'";
ADOQuery2->Close();
ADOQuery2->SQL->Clear();
ADOQuery2->SQL->Add(mysql);
ADOQuery2->ExecSQL();
请问各位老师,我的程序哪里出错了呢????帮忙指正呀!很急呀!!!
[解决办法]
一个等号 是赋值的意思