Autor Beitrag
DelphiFreund
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: So 20.06.04 14:31 
Wie lässt sich am besten in einer Paradox-Tabelle herausfinden, ob die Tabelle ganz leer ist. Man soll ein Löschen-Fenster schließlich nur öffnen können, wenn die Tabelle leer ist.
EUOCheffe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124



BeitragVerfasst: So 20.06.04 16:10 
TTable.RecordCount
DelphiFreund Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: So 20.06.04 16:26 
Und bei Query?
Aton
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 125

Windows XP
D7 Enterprise
BeitragVerfasst: So 20.06.04 16:39 
Rate mal... :wink:
DelphiFreund Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: So 20.06.04 16:53 
Danke. Ich dachte ich habe alles bei Query ausprobiert.
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: So 20.06.04 17:44 
Ich bin mir nicht sicher, ob das immer noch so ist, aber RecordCount liefert nicht immer das richtige Ergebnis. Ich hab mal die Erfahrung gemacht, dass nicht alle Datensätze abgeholt werden und erst damit wird RecordCount gesetzt. Solltest Du irgendwelche Datenbanksensitiven Komponenten dahinter haben ist das kein Problem, aber wenn nicht, empfehle ich Dir erstmal alle Datensätze mittels
ausblenden Delphi-Quelltext
1:
Query1.FetchAll;					

zu holen, damit Du wirklich sicher sein kannst, dass RecordCount stimmt.
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: So 20.06.04 18:16 
hallo,

da du query verwendest, greifst du mittels sql auf die tabelle zu. dann kannst du
ausblenden Quelltext
1:
Select count(*) FROM Tabelle					

verwenden.

Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.