
MemTableEh DataDriver attribute set ADODataDriverEh1
ADODataDriverEh1 ProviderDataSet attribute set FDQuery
FDQuery SQL is the SELECT * FROM t_ProductBom where ProductID=: ProductID
To perform refresh again after deleting data errors when
Delete the code is
if FDQuery & lt;> Nil then
The begin
TableID:=DBGridEh DataSource. The DataSet. Fields. [0] AsString;
//on the particularity of the product BOM special processing
If TForm (Sender). Caption='BOM' then
The begin
DESQL:='DELETE t_ProductBom where ProductID=' "+ DBGridEh. The DataSource. The DataSet. FieldByName (' ProductID '). AsString +
"' and ProductItmeID=" '+ DBGridEh. The DataSource. The DataSet. FieldByName (' ProductItmeID). AsString +
"' and BomID like" '+ DBGridEh. The DataSource. The DataSet. FieldByName (' BomID). AsString +' % '"';
End
The else
DESQL:='DELETE t_' + Man. ChilFormTable + 'where' + Man. ChilFormTable +
"ID=" '+ TableID + "' "';
Man. FDQuery1. Close;
Man. FDQuery1. SQL. The Clear;
Man. FDQuery1. SQL. The Add (DESQL);
Man. FDQuery1. ExecSQL;
FDQuery. Refresh;
If MemTableEh<> Nil then
The begin
MemTableEh. Refresh;
MemTableEh. Last;
end;
end;
MemTableEh again Refresh suggests this is product BOM module performs is BOM delete code

What is the problem? I insert refresh operation can be fine
CodePudding user response:
And yao to his stupid dead, MemTableEh forgot to initialize the prefix MemTableEh:=nil; Be, it can be the
CodePudding user response:

Low-level error is right,