Filesize Function with Win95 & BP7 
Author Message
 Filesize Function with Win95 & BP7

Hi,
can someone help me, I have a problem using windows 95 as a network, and
BP7.00. When trying to run the program attached (testsize.pas) the server
machine correctly records the file size, but as soon as the program is run
from then the work station, it reports file size correctly, but then adds
the record at the wrong place. When the server has records added it
increments from the work stations record size, and after the server as
added, lets say 5 records, and the work station begins to add new records,
the work station filesize carrys on where it left off the last time it added
record, as if its not getting the physical filesize on the server.
kind regards
michae reyneke

{$A+,B-,D+,E+,F-,G-,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V-,X+,Y+}
{$M 60000,0,655360}
pROGRAM TESTSIZE;
uSES wincrt,windos;
TYPE
  StMFRec = RECORD
    stmf_Code                     : String[15];
    stmf_Description              : String[30];
    stmf_SupplierCode             : String[15];
    stmf_Single_Serial            : String[20];
  end;
  VAR
  STDAT : fILE OF STMFREC;
  STWORK : STMFREC;
  CH : cHAR;
  STX,
  XXX : lONGINT;
LABEL RESTART;
  BEGIN
  FILEMODE:=66;
  ASSIGN(STDAT,'stk.ST1');
  {$I-}
  RESET(STDAT);
  {$I+}
  IF IORESULT<>0 THEN REwrite(STDAT);
RESTART:
     WRITELN('PRESS ENTER TO ADD A STOCK RECORD');
     ch:=readkey;
     IF CH=#27 THEN
     BEGIN
     CLOSE(STDAT);
     HALT;
     END;
     FILLCHAR(STWORK,SIZEOF(STWORK),0);
     XXX:=filesize(STDAT);
     WRITELN('tHERE WERE ',xxx,' RECORDS');
     XXX:=filesize(STDAT)+1;
     SEEK(STDAT,XXX-1);
     WRITE(STDAT,STWORK);
     XXX:=filesize(STDAT);
     WRITELN('NOW THERE ARE ',XXX,' RECORDS');
     WRITELN('pRESS A KEY TO UNLOCK FILE');
GOTO RESTART;
end.



Sat, 12 Aug 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Filesize Function with Win95 & BP7

2. filesize - BP7 & Win95

3. filesize - BP7 & Win95

4. Installing BP7 in Win95/Pentium & memory

5. Function fileSize() with untyped File

6. BP7: Function of type function

7. BP7-Debugger and Win95

8. BP7 under Win95?

9. Using WIN95-Dialogs in BP7

10. Problem: BP7 some DPMI progs crash under Win3x and Win95

11. How to create an PPP-Connection under BP7/Win95

12. Overlay error while debugging in BP7 under Win95?

 

 
Powered by phpBB® Forum Software