Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[10364] 이거 정말 에러가... I/O Error 131...
박성준 [popo8402] 1033 읽음    2005-11-26 03:44
아래 소스에서 에러가 나네요...
알려주셈

procedure TMainfrm.DeleteRecord;
var
  CurPos, RecordNo, i: integer;
  Buffer: array[0..MAX] of TMyRecord;
begin
  if MessageDlg('정말 지우시렵니까?', mtConfirmation, [mbYes, mbNo], 0) = mrNo
    then Exit;
  if NewRecord then
  begin
    ReadRecord;
    NewRecord := False;
    EnableButtons(True);
    Exit;
  end;
  CurPos := FilePos(MyFile);
  RecordNo := FileSize(MyFile) - CurPos - 1;
  if (FilePos(MyFile) < (FileSize(MyFile) - 1)) then
  begin
    Seek(MyFile, FilePos(MyFile) + 1);
    i := 0;
    while not EOF(MyFile) do
    begin
      Read(MyFile, Buffer[i]);
      Inc(i);
    end;
    Seek(MyFile, CurPos);
    Truncate(MyFile);
    for i := 0 to RecordNo - 1 do
      write(MyFile, Buffer[i]);
    end
    else
    begin
      Truncate(MyFile);
      Dec(CurPos);
    end;
    Seek(MyFile, CurPos);
    ReadRecord;
end;

+ -

관련 글 리스트
10364 이거 정말 에러가... I/O Error 131... 박성준 1033 2005/11/26
10366     Re:이거 정말 에러가... I/O Error 131... civilian,안영제 1657 2005/11/26
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.