Autor Beitrag
Schumi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 33

Win XP, Linux
D7 Prof., D2006 Entpr.
BeitragVerfasst: Do 14.08.03 15:24 
Hallo!

Ich möchte gerne während des laufenden Programms das Query im DataSet ändern (Eigenschaft CommandText), so daß dieses mir die Daten des aktualisierten Queries liefert.

Hat jemand ne Idee?

Danke und Gruß
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Do 14.08.03 16:29 
Querry.commandtext='neuer Text'

so einfach.

grez
msch
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Do 14.08.03 21:13 
"Active:=False; Active:=True" nicht vergessen, wenn es sich denn um einen CustomClientdataset-Nachfolger handelt (nehme ich mal aufgrund des Commandtext-Properties an).

Cu, :)
Udontknow
Schumi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 33

Win XP, Linux
D7 Prof., D2006 Entpr.
BeitragVerfasst: Fr 15.08.03 08:32 
Titel: Danke
Vielen Dank!

Manchmal sieht man halt den Wald vor lauter Bäumen nicht... :shock:
Alfons-G
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 307

Win XP Prof, Linux, Win 7
D5 Prof, D7 Architect, D2005 Architect, D2007 Architect
BeitragVerfasst: Fr 15.08.03 08:58 
Das "active := false;" macht die Komponente selbständig, sobald ein neuer Text zugewiesen wird. Nur DANACH muß man sie wieder explizit öffnen, eben mit "active := true;" oder kürzer mit der Methode "open;".

8)

_________________
Alfons Grünewald
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Fr 15.08.03 11:18 
Das ist nicht korrekt. Zumindest TClientdataset-Nachfahren reagieren auf eine Änderung des CommandTexts überhaupt nicht. Daher ist eine Deaktivierung bei diesen Komponenten zwingend notwendig.

Cu,
Udontknow