As you'll have gathered, I'm not doing much coding at the moment but the 'problem' that I asked about in January has reared its head.
A reminder - I have an old customer with a very old PC which 'Died' taking his Garage business database out.
It was running a DOS program so there was no Mouse support and writing a Windows program was not viable - even though I did go through the motions. He brought me a 'backup' PC which was running Win 98 but didn't have a COM Port mouse, No PS/2 port . . . . . Long Story - now short . . . . I've at least 'Resurected' it (I've actually named it 'Lazarus'!

) Installed a PCI card with PS/2 & USB along with a copy of Win XP - It's now fully operational and I have run the Pascal program on it.
NOW - He was hoping to re-install his old program probably running in a DOS Window but the 'Master' discs that he has are only a [Demo] version. So I offered to extract his 'Products' file from the Backup Data that he did have - (I'd already extracted Names etc. & Vehicles) This was going very well but out of the blue I'm getting a 103 File not Open error - this is with the Name & Address File which had been working perfectly - - Stepping through, I can see that the file 'Opens' - ie. IOResult returns zero, but when it should then read the file until EOF it skips to 'Close File' (jumps from line 5 to 12) and returns the 103 when I try to execute line 12.
Two bits of code - the first is the assignment and opening and the second is the Reading :
Assign(NAD_FIle,datapath+'LeekNAD.DAT');
{$I-} Reset(NAD_file); {$I+}
I := IOResult;
If I = 0
then
begin
Read_NAD_File;
end
else
procedure Read_NAD_File;
begin
SetLength(NAD,20);
n :=1;
while not EOF do
begin
read(NAD_File,NAD[n]);
inc(n);
if n > length(NAD)-1
then SetLength(NAD,Length(NAD)+20);
end;
close(NAD_File);
end;
Nothing extraordinary and I've just checked the Vehicles file and that's doing the same !!!!! Both .DAT files have been in use since they were created in January and I've also re-created them from the original .DBF files.
Can anyone suggest what I might have done to upset the applecart?