Autor Beitrag
Jagg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Fr 06.12.02 09:30 
Morgen !

Wie lese ich die Länge eines Feldes aus einer Tabelle raus !

So in etwa ? :
ausblenden Quelltext
1:
2:
if TB.FieldByname (Length('Wieviel') = 1 then
      y := '  ';


....dann sagt das Programm aber "String und Boolean sind inkompatible Typen"

Jagg !

PS : Achja....y : string;
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Fr 06.12.02 09:40 
Hi
Welche Länge willst du denn haben? Die Länge mit der das Feld in der Tabelle definiert ist:
ausblenden Quelltext
1:
 TB.FieldByName('Wieviel').Size					


oder die Länge das aktuellen Feldinhaltes:
ausblenden Quelltext
1:
  Length(TB.FieldByName('Wieviel').AsString)					


Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Fr 06.12.02 09:53 
das 2 te danke LCS !