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: Di 26.10.04 18:09 
Liebe Helpher,

ganz blöde Frage: wenn ich ein Query-Update mache [with QBuecher do ..]
habe ich die Änderungen dann eigentlich auch in der zugrundeliegenden Tabelle
oder muss ich ein Tabellen-Update machen [with TbBuecher do ..] ?

Dank für Hilfe,
Detlef Annies
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 26.10.04 18:56 
Was meinst du mit Update?
Eine Aktualisierung der Ansicht in der Form (z.B. in einem DBGrid) oder eine Änderung auf der Datenbank-Tabelle?
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.10.04 20:42 
Hi, Jasocul,
mein Code an dieser Stelle lautet:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
with QBuecher do
begin
  sql.close; sql.text := 'update buecher where ..  '
end;


Wobei buecher die DBTabelle ist. Also, ich denke, es werden query und Tabelle geändert. Ist das richtig?

Danke, Detlef Annies

Moderiert von user profile iconUGrohne: Delphi-Tags hinzugefügt.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 26.10.04 20:47 
Das SQL-Statement UPDATE ist für Änderungen (update tabelle set ... where ...) an der DB-Tabelle vorgesehen. Die DB-Tabelle wird dadurch nicht aktualisiert im Sinne von neu geholt.
Dafür genügt ein sql.Refresh oder sql.Close und sql.open.