奇怪的更新问题:ADOQuery执行delete语句,ADOTable未得到更新
code如下:
ADOTable1->Append();ADOTable1->FieldByName("username")->AsString="xx";ADOTable1->FieldByName("userid")->AsString="6";ADOTable->Post();//通过ADOTable->Append()追加一条空白信息ADOQuery1->Active=false;ADOQuery1->SQL->Clear();ADOQuery1->SQL->Add("delete from userinfo where username='xx'");ADOQuery1->ExecSQL();//执行删除打开SQL Server SQL查询分析器查询 确定新添加的username=xx的记录已被删除 //使用下列语句还能得到实际已被删除的username=xx这条记录if(ADOTable1->MoveBy(1))Edit1->Text=ADOTable1->FieldByName("username")->AsString;