Autor Beitrag
Karstadt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Do 08.12.05 14:56 
Hallo. Feld nur = INC wert (eingestellt in SQL server)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
T_tabelle.append;
t_tabelle.fieldbyname('test').asstring := 'irgendwas';
T_tabelle.post;


Showmessage(t_tabelle.fieldbyname('nr').asstring) //feld leer!

T_tabelle.append;
t_tabelle.fieldbyname('test').asstring := 'irgendwas';
T_tabelle.post;
T_tabelle.refresh;


Showmessage(t_tabelle.fieldbyname('nr').asstring) //feld = inc wert!

//warum?
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Do 08.12.05 14:59 
N bissel mehr Text brauchts schon ums zu was du meinst (ich zumindest ;))
Karstadt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Do 08.12.05 15:11 
Ich versucha das entwa anders. Wenn ich über Mysql Administrator eine Tabelle anlege und bei einer Spalte z.b. NUMMER sage, das dieses Feld nicht leer sein darf und das das ein INC wert enthalten soll.


Nun lege ich ein neuen DS an, das mache ich mit (siehe Code oben). Nach Speichern (POST) lese ich den Feld "NR" aus und siehe da, der ist LEER! Erst nach Tabelle.refresh kann ich diesen Wert aus den neue DS auslesen. Warum ist das so?