for문이 이상하네요.
다음과 같이 수정해보세요..
while not TB.Eof do begin
for ic:=0 to TB.FieldCount-1 do
Write(txt, TB.Fields[ic].Value);
Writeln(txt, '');
TB.Next;
end;
박이석 님이 쓰신 글 :
: 현재 테이블 컴포넌트를 이용하여 디비그리드에 로드된 디비를 txt로 저장하려고 합니다. 디비는 디비그리드에 나오는데염..저장이 암것도 안되서염..
: SD는 savedialog이구염..버튼을 누르면 Savedialog가 떠서 저장하도록되어있습니다.
: 고수님들 소스좀 보시구 고쳐주세염.. 부탁드립니다.
:
: if SD.Execute then begin
: fName:= SD.FileName;
: fName:= 'DB'+FormatDateTime('hhnnss',Now)+'.Txt';
: AssignFile(Txt,fName);
: Rewrite(txt);
: for ic :=0 to TB.RecordCount -1 do begin
: Writeln(txt,TB.Fields[iC].Value);
: end;
: CloseFile(Txt);
: end;
:
|