Q&A

  • 에러날게 없는데.. ㅠㅠ
도대체 이해가 안가네요...



Try

Dm.Database1.StartTransaction;

With TQuery.Create(nil) do

begin

DatabaseName := Database1.DatabaseName;



AssignFile(F, FName);

Reset(F);

FileMode := 0;



while not EOF(F) do <----F바로 앞에서 에러가 나요.. Missing

Operator or Semicolon

begin



DB에 Write;



end; //While

Free;

end; //With

DataBase1.Commit; {on success, commit the changes};

except

DataBase1.Rollback; {on failure, undo the changes};

raise; //raise the exception to prevent a call to CommitUpdates!



end;

CloseFile(F);



정말 에러 날 곳이 없지 않나여??



혹시 EOF가 With의 영향을 받는게 아닌지..

2  COMMENTS
  • Profile
    최성진 2001.11.20 04:36
    > 혹시 EOF가 With의 영향을 받는게 아닌지..

    ===> 이 의문이 맞습니다..

    영향을 받죠.....



    eof -> SeekEof로 바꾸어주세요...그럼 될겁니다.

    eof나 SeekEof는 같은 의미입니다.









    몰겠당.. wrote:

    > 도대체 이해가 안가네요...

    >

    > Try

    > Dm.Database1.StartTransaction;

    > With TQuery.Create(nil) do

    > begin

    > DatabaseName := Database1.DatabaseName;

    >

    > AssignFile(F, FName);

    > Reset(F);

    > FileMode := 0;

    >

    > while not EOF(F) do <----F바로 앞에서 에러가 나요.. Missing

    > Operator or Semicolon

    > begin

    >

    > DB에 Write;

    >

    > end; //While

    > Free;

    > end; //With

    > DataBase1.Commit; {on success, commit the changes};

    > except

    > DataBase1.Rollback; {on failure, undo the changes};

    > raise; //raise the exception to prevent a call to CommitUpdates!

    >

    > end;

    > CloseFile(F);

    >

    > 정말 에러 날 곳이 없지 않나여??

    >

    > 혹시 EOF가 With의 영향을 받는게 아닌지..

  • Profile
    몰겠당.. 2001.11.20 05:14
    제가 이거 안되서.. 오후내내 고민하다가



    결국은 안되서 여기에 올린건데..



    일케 고마울 때가..



    정말 감사합니다. ^^



    복받으실거예염..