用C++ Builder更新数据库内容,提示ADOQuery1:missing SQL property
ADOQuery1->SQL->Text="Select * from dbo.goods where gnum= '" + Edit1->Text + "' ";
ADOQuery1->ExecSQL();
ADOQuery1->Active=true;
String strSQL="";
ADOQuery1->SQL->Text=strSQL;
if(Edit1->Text == ADOQuery1->Fields->FieldByName("gnum")->AsInteger)
{
strSQL="Update dbo.goods set gcount = gcount + Edit2->Text";
}
运行后,提示adoquery1.active:=ture时,提示“adoquery1:missing sql property”
这是什么问题呢?新手求助!
[解决办法]
注释掉ADOQuery1->ExecSQL();
ADOQuery1->SQL->Text="Select * from dbo.goods where gnum= '" + Edit1->Text + "' ";
ADOQuery1->Active=true;