数据写入时遇到奇怪的错误?
运行时提示
Key column information insufficient or incorrent.Too many rows were affect by update
不知道什么原因?
紧!!!
TADOQuery* Query=new TADOQuery(this);
Query->Connection = Conn;
try{
Query->SQL->Text="select price from machine";
Query->Open();
while (!Query->Eof){
Query->Edit();
Query->FieldByName("price")->Value=chkPrice(Query->FieldByName("Price")->Value);
Query->Post();
Query->Next();
}
}
__finally{
delete Query;
}