P
P_W_Q
Unregistered / Unconfirmed
GUEST, unregistred user!
三層結構中,主表中包含TDataSetField字段,刪除主表時出現"Cannot delete master Record with detail"(100分)<br />var
TMidClientData:=TClientDataSet.Create(nil);
TMidClientData.Data:=CDSM.Data;
CDSM.Close;
CDSM.CommandText:='Select * from WorkA where Inv_no="B51017-00401B"';
CDSM.Open;
While not CDSM.Eofdo
begin
If TMidClientDataSet.Locate('Inv_no',CDSM.FieldByName('Inv_no').AsString,[]) then
TMidClientDataSet.Delete;//此處報錯
CDSM.Next;
end;
三層結構中,主表CDSM中包含TDataSetField字段('AdoWorkB'),刪除主表時出現"Cannot delete master Record with detail"
不知如何處理,各位富翁指點!
謝謝!
TMidClientData:=TClientDataSet.Create(nil);
TMidClientData.Data:=CDSM.Data;
CDSM.Close;
CDSM.CommandText:='Select * from WorkA where Inv_no="B51017-00401B"';
CDSM.Open;
While not CDSM.Eofdo
begin
If TMidClientDataSet.Locate('Inv_no',CDSM.FieldByName('Inv_no').AsString,[]) then
TMidClientDataSet.Delete;//此處報錯
CDSM.Next;
end;
三層結構中,主表CDSM中包含TDataSetField字段('AdoWorkB'),刪除主表時出現"Cannot delete master Record with detail"
不知如何處理,各位富翁指點!
謝謝!