Autor Beitrag
Nomis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Fr 16.08.02 00:22 
Hallöchen,

Ich möchte ein Datetime Feld in einer Paradox7 Datenbank leeren habe es mit
ausblenden Quelltext
1:
table1.FieldValues['Datum'] :='';					

versucht aber ist ja klar das er mir dann sagt, das dies kein zulässiges Datum ist und bei
ausblenden Quelltext
1:
table1.FieldValues['Datum'].clear;					

Mekert er " die Variante refrenziert kein Automatisierungsobjekt"

wie kann ich dieses Datenfeld trotzdem Löschen ??

Gruß Simon
ao
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 145

Win XP Prof.
D7 Ent.
BeitragVerfasst: Fr 16.08.02 08:34 
Hallo Nomis,
also da ich von TTable nicht viel halte, würde ich es mit SQL und der TQuery-Komponente versuchen:
ausblenden Quelltext
1:
2:
3:
TQuery.SQL.Clear;
TQuery.SQL.Add('UPDATE DeineTabelle SET Datum = NULL WHERE DeinKey = DeinWert');
TQuery.SQL.ExecSQL;
Wenn dein Datumsfeld NULL erlaubt sollte es klappen.

Gruß
Andreas
Steffer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 299



BeitragVerfasst: Fr 16.08.02 10:07 
Mache es doch ganz einfach so:
ausblenden Quelltext
1:
2:
3:
Table.Edit;
Table.FieldByName('Datum').Clear;
Table.Post;

Mit FieldValues must du einen WERT übergeben...

@ao
Das mit den TTables ist ja auch ein lustiges Sätzchen. ;-)

_________________
Keine Signatur ...