Autor Beitrag
NTM
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Mo 04.12.06 19:11 
Hallo zusammen,
ich habe mal wieder ein kleines Problem ich möchte in DBEdit 1 eine wert eingeben der aber dann auch in DBEdit2 übernommen wird.

Ich bin für jede Hilfe oder Anregungen Dankbar.
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: Mo 04.12.06 19:14 
Wenn Du beide mit demselben Feld des Queries verbindest, sollte das eigentlich automatisch der Fall sein, ansonsten hast Du ein Problem in Deinem Datenbank-Design: Denn in diesem Fall hast Du Redundanzen drin und das ist (meistens) nicht Sinn einer Datenbank.

Solltest Du es trotzdem brauchen: Schnapp Dir das Ereignis OnLeave des ersten DBEdits und übertrage dann den Wert des dahinter stehenden Feldes (Query) in das Feld von DBEdit2.
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Mo 04.12.06 19:17 
Hallo Uwe,
sorry ich stehe wohl etwas auf der Leitung.
Wie soll denn der Befehl für das Onleave aussehen dafür?.
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Mo 04.12.06 19:20 
Hallo Uwe,
ich bin nochmal sorry aber in meine DBEdit gibt es keine Eigenschaft mit Onleave.
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mo 04.12.06 19:29 
Lasse doch mal das OnLeave weg. Das war ein Notnagel. Wußte gar nicht, daß es sowas gibt. :shock: Für DB-Komponenten braucht man eine DataSource. Ist diese mit dem DB-Edit per DataField richtig verknüpft, dann stehen in 2 DB-Edits dieselben Werte und fertig.

_________________
Gruß
Hansa
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Mo 04.12.06 19:31 
Danke habe es gerade anders gelöst in dem ich meine Kompletten SQL Befehl umgeschrieben habe.
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mo 04.12.06 19:49 
Erkläre mal, wie das alleine mit SQL-Mitteln und DB-Komponenten zu lösen ist :

user profile iconNTM hat folgendes geschrieben:
...gerade anders gelöst in dem ich meine Kompletten SQL Befehl umgeschrieben habe.


:shock:

_________________
Gruß
Hansa
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Mo 04.12.06 20:07 
Es ging darum das der User denn Einzelpreis eingibt (DBEdit1) es ist der reine Netto Wert.
Im DBEdit2 sollte eigentlich der Verkaufwert also Brttowert rein.
Da der User aber nur denn Einzelpreis braucht und nicht denn Verkaufspreis habe ich kurzer Hand denn SQL Befehl zun Berechnen der Felder geändert.

Ich wollte eigentlich das Feld behalten denn falls er es doch irgend wann mal braucht das ich es sofort habe.
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mo 04.12.06 20:20 
Nun denn, keine Antwort ist auch eine Antwort. :mrgreen: Das Zauberwort heißt sowieso "stored Procedures".

_________________
Gruß
Hansa