Autor Beitrag
GUFR
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Do 20.10.05 20:06 
Hallo

Wie lautet die Syntax um Text mit Tabstop getrennt zu speichern

Hier mein Code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
procedure TForm1.Button1Click(Sender: TObject);
  var i : Integer;
begin
  AssignFile(f, 'SerienTxt.txt');
  rewrite(f);
  Form1.Query1.SQL.Clear;
  Form1.Query1.SQL.Add('Select * FROM Elektr_Lohnzahlung');
  Form1.Query1.open;
  Form1.Query1.First;
  While Not Form1.Query1.Eof DO
  begin
    For i:= 0 To Form1.Query1.FieldCount-1 Do
    Write(F,
    Form1.Query1.Fields[i].AsString+' ');
    if Form1.Query1.FieldCount-1 =
    Form1.Query1.FieldCount-1 Then
    Writeln(f,' ');
    Form1.Query1.Next;
  end;
  CloseFile (f);
  Form1.Query1.SQL.Clear;
  Form1.Query1.SQL.Add('Select * FROM Elektr_Lohnzahlung');
  Form1.Query1.Active:= True;
end;


Gruss

Gufr

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.
Moderiert von user profile iconChristian S.: Topic aus Sonstiges verschoben am Do 20.10.2005 um 21:10
Lake
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78


D6 prof., Delphi 10.2 Tokyo
BeitragVerfasst: Do 20.10.05 20:10 
ausblenden Quelltext
1:
String + #9 + String					
BattleFrog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 53

WIN 2000
Delphi 7 Ent.
BeitragVerfasst: Fr 21.10.05 09:31 
Das ASCII Zeichen mit dem Code 9 ist das Tabstopp Zeichen.

In einen String kannst du es auch so einfügen:

ausblenden Delphi-Quelltext
1:
'text' + Chr(9) + 'noch mehr text'					
GUFR Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Fr 21.10.05 18:51 
Hallo

Es funktioniert super.

Danke

GUFR