Autor Beitrag
D. Annies
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Mo 25.04.05 17:52 
Hallo, Helpher,

Der Compiler meckert nicht, erst bei der Ausführung des folgenden Codes:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
if TbBuch.findfield(TbBuch.fieldbyname('Titel').asstring) <> NIL then
begin  
  // gib im Stringgrid aus  
end;



Wer kann helfen?
Grüße von D. Annies

Moderiert von user profile iconraziel: Delphi-Tags repariert.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 25.04.05 17:56 
mach mal die tags anständig, dann kann man das auch besser erkennen, naja ich mach des mal:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if TbBuch.findfield(TbBuch.fieldbyname('Titel').asstring) <> NIL then 
begin 
// gib im Stringgrid aus 
end;


was ist denn TbBuch ?

und wie soll er da meckern, ist doch nur ne abfrage oder meckert er nur wenn da was drinne steht ?
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Mo 25.04.05 18:36 
Hi,

der Fehler war, dass ich fieldbyname mit aufgerufen habe. Es reicht und ist richtig:

ausblenden Delphi-Quelltext
1:
if TbBuch.findfield('Titel') <> NIL then ...					


Äh, TbBuch ist der Name einer DBTabelle..

Bis dann, D. Annies

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 25.04.05 18:47 
Zitat:

Äh, TbBuch ist der Name einer DBTabelle..

dachte ich mir :D und jetzt funzt es ?
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Di 26.04.05 21:46 
Jau!