Autor Beitrag
japetos
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Di 27.09.05 21:18 
ich uebergebe eine DBEdit Feld
folgendes:
ausblenden Quelltext
1:
DBEdit1.Field.AsString := s;					


1. wird der String(hier: s) nicht in der DB gespeichert und
2. wenn ich etwas im DBEdit aendern moechte, dann wird alles im DBEdit geloescht.

Wie kann ich die Sache hinbekommen?
wlfmario
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 114

Windos XP SP2
D7 Enterprise & D2005 PE
BeitragVerfasst: Di 27.09.05 21:24 
ist nur ein Tip ins Blaue !

ausblenden Quelltext
1:
DBEdit1.Field.AsString := 's';					
japetos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Di 27.09.05 21:28 
nein.
Das hilft nicht, da damit nur das Zeichen 's' uebergeben wuerde.
Denn
ausblenden Quelltext
1:
s := FileName;					
Bluby
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Di 27.09.05 22:31 
hallo! kannst du dem DBEdit nicht einfach über die eigenschaft text den wert zuweisen? müsste doch eventl. klappen.


bluby
japetos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Mi 28.09.05 13:18 
hab ich auch schon probiert. geht auch nicht.
geht es denn nicht dass man direkt in die DB speichert?
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: Mi 28.09.05 14:06 
Ganz genau. Dein DBEdit ist über eine DataSource mit einem DataSet (Query oder Tabel) verbunden. Dort musst du die Zuweisung vornehmen.
z.B.:
ausblenden Delphi-Quelltext
1:
Table1.FieldByName(<DeinFeldname>).AsString := s;					

Das was du vor hast geht aber auch. Ich würde es aber so nicht machen:
ausblenden Delphi-Quelltext
1:
DBEdit1.Text := s;					
japetos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Mi 28.09.05 14:32 
@jasocul

MERCI. Jetzt funzt es!!!

DONKEEEE!!!