Update Failed. Found 0 records
Posted: Fri 14 Apr 2006 19:32
Jigesh wrote: I am using Delphi7, SDAC 3.70.1.25 and MSSQL 7.
Consider the following code.
procedure TVCTData.tblPONewRecord(DataSet: TDataSet);
begin
with tblNewPONo do
begin
Open;
try
Edit;
tblPOPO_ID.Value := tblNewPONoNextPOID.Value;
tblNewPONoNextPOID.Value := tblNewPONoNextPOID.Value + 1;
Post;
finally
Close;
end;
end;
tblPOPO_Date.Value := Date;
tblPODateReq.Value := Date + 7;
tblPOPOStatus.Value := 'Open';
tblPOShipTo.Value := 1001;
tblPOTaxRate.AsFloat := 6.75;
tblPOPOSubTotals.AsCurrency := 0;
tblPOPOTotal.AsCurrency := 0;
tblPOTaxChgs.AsCurrency := 0;
end;
When I click on a button to add a new record this code is executed with no problems. It also issues me a new PO Number. But if I open another instance of the program from another computer and click on the button to add a new record it gives me an error message "Update Failed. Found 0 records." But if I exit out of the program from the second computer and then open the program again from the second computer the code executes successfully and issues me the next PO number in sequence. How can I resolve this issues. I have tried all the solutions in the forum for this type of problem, but no success. I need to resolve this as soon as possible because I am stuck on this problem for now 2 weeks.
Any help will be really appreciated.