Autor Beitrag
jann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Mi 17.09.03 07:56 
Hi

ich habe folgendes problem ich arbeite mit einer Acces datenbank. Dort soll ich aus einer bestimmten Spalte zahlenwerte raus hohlen.
dies mach ich mit:

Form1.ADOTable1.Filter :='BEGEB ='+i;

das klapp auch wunderbar, aber ich soll jetzt diese gefilterten werte alle auf einmal in neue umwandeln.

z.B.
ich filter nach 2 und soll dann alle gefilterten zahlen in 3 umwandeln

gruß jann
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: Mi 17.09.03 09:48 
Ich würde das mit SQL machen:
ausblenden Quelltext
1:
UPDATE tabelle SET begeb=3 WHERE begeb=2;					

Der Befehl reicht dafür aus.
jann Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Mi 17.09.03 10:05 
danke
aber wie binde ich das in mein programm ein?

wenn ich es nur rüberkopiere sagt der immer Update undefinierter bezeichner.
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mi 17.09.03 10:56 
Hallo,

anstatt einer ADOTable musst Du eine ADOQuery benutzen.

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
var aQuery:TADOQuery;
...
...
aQuery.Text:='Update...';
aQuery.ExecSQL;
...
...

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
jann Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Do 18.09.03 07:35 
danke für eure hilfe
habs hinbekommen