Autor Beitrag
kiwicht
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: Sa 26.06.04 10:39 
Moin,

gibts mit TQuery ne Möglichkeit den kompletten Inhalt einer bestimmten Spalte zu löschen? Also nicht die Spalte selber entfernen, sondern nur den Inhalt dieser Spalte (Feld) komplett leeren?

danke euch

ki
DelphiFreund
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: Sa 26.06.04 10:48 
Hi,
wie wäre es mit:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
  Query1.First;
  for zaehler:= 1 to Query1.RecordCount do begin
    Query1.Edit;
    Query1.FieldByName('Spalte').AsString:= '';
    Query1.Post;
    Query1.Next;
  end;
kiwicht Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: Sa 26.06.04 10:54 
jau, dank dir... an ne Schleife hab ich auch schon gedacht... hattte nur gehofft es geht auch "eleganter" :)

Aber als Lösung durchaus akzeptabel, falls sich nichts anderes findet

thx
ki
DelphiFreund
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: Sa 26.06.04 10:57 
Wenns was besseres gibt, sag mir bescheid. Ich hab auch ein Programm, das das auch braucht.
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Sa 26.06.04 11:11 
Hallo,

das könnt ihr mit SQL machen.
ausblenden Delphi-Quelltext
1:
2:
3:
Query.SQL.Text := 'UPDATE Tabelle'#13#10 +
  'SET Spalte = NULL';
Query.execSQL;

Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
kiwicht Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1021

Win 7, MacOS
Delphi x, VBA, PHP, ...
BeitragVerfasst: Sa 26.06.04 12:20 
Jau, Danke CenBells!

Löppt wie geschmiert, genau das meinte ich :D

thx

ki