도대체 이해가 안가네요...
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의 영향을 받는게 아닌지..
===> 이 의문이 맞습니다..
영향을 받죠.....
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의 영향을 받는게 아닌지..