Autor Beitrag
Alex
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28


D5 Epr
BeitragVerfasst: Fr 20.09.02 11:24 
Hallo zusammen,
kann mir jemand einen Tipp geben wie ich einen kompletten Datensatz mittels Botten in den nächsten kopieren kann ?
Tabelle Paradox 7 / Delphi 7
MrSpock
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 262



BeitragVerfasst: Fr 20.09.02 11:50 
Hallo Alex,

leg eine zweite Instanz eines TTable Objektes auf dieselbe Tabelle an, dann schreibst du in die OnKlick Methode des Buttons:

ausblenden Quelltext
1:
2:
3:
4:
5:
Table2.Append;
Table2.FieldByName('Vorname').AsString := Table1.FieldByName('Vorname').AsString;
Table2.FieldByName('Nachname').AsString := Table1.FieldByName('Nachname').AsString;
{ sonstige Felder setzen }
Table2.Post


Das Ganze solltest du am besten in einen try...except Block packen.
Schau dir auch mal AppenRecord an, damit kannst du ggf. etwas Schreibarbeit sparen.

_________________
Live long and prosper
MrSpock \\//