wenn ich bei diesem code die .html datei speichern möchte, stürzt das tool ab.. und generiert auch kein .html file
Delphi-Quellcode:
procedure TFimexport.SpeedButton1Click(Sender: TObject);
begin
if SaveDialog1.Execute
then
IBQuery1.SQL.Text := '
SELECT mov_title, mov_genre FROM mov_db';
IBQuery1.Open;
IbQuery1.FetchAll;
while not IBQuery1.Eof
do begin
TabList := TStringList.Create;
try
TabList.Add('
<html><head></head><body>');
TabList.Add('
<Table>');
LineStr := '
<tr>';
for i := 0
to IBQuery1.FieldCount-1
do begin
LineStr := LineStr + '
<td>[b]' + IBQuery1.Fields[i].DisplayLabel + '
[/b]</td>'
end;
TabList.Add(LineStr + '
</tr>');
LineStr := '
';
while not IBQuery1.Eof
do begin
LineStr := '
<tr>';
for i := 0
to IBQuery1.FieldCount-1
do begin
LineStr := LineStr + '
<td>' + IBQuery1.Fields[i].asString + '
</td>'
end;
TabList.Add(LineStr + '
</tr>');
LineStr := '
';
Next;
end;
TabList.Add('
</Table></body>');
TabList.SaveToFile(SaveDialog1.FileName);
finally
TabList.Free;
end;
end;
end;