Delphi :: File Write Exception
Posted on 2007-10-11
I have a function in Delphi 7 which does some file writing on a text file.
If executing the function for the first time then it works fine but when I the file
already has data I receive a exception. "I/O error 32"
Please have a look at my function and tell me where am I going wrong?
function TfrmMain.InsertParameter(const Val1, Val2, FixedAmount, Percentage :Double;
Cond :String; CondAmount :Double): Integer;
NewID := GetID;
If FileExists(sParamFile) then Append(fParam)
Writeln(fParam, NewID, Val1, Val2, FixedAmount, Percentage, Cond, CondAmount);
Result := NewID;
Result := -1;