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



BeitragVerfasst: Di 18.10.05 22:02 
Hallo.
bei diesem Aufruf:
ausblenden Quelltext
1:
2:
3:
KAAdoTable1.Append;
KAAdoTable1.FieldByName('files').AsString := p;
KAAdoTable1.Post;


wird nur eine neuer Datensatz angelegt.

Wie kann ich es hinbekommen, dass zu einem Datensatz hinzugefuegt (nicht ueberschrieben) wird?
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 19.10.05 07:28 
Sorry, das verstehe ich nicht. Man fügt nicht zu einem Datensatz zu, sondern zu einer Tabelle. Und das wird zum Beispiel so gemacht, wie in deinem Code-Schnipsel.
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mi 19.10.05 07:42 
ausblenden Quelltext
1:
KAAdoTable1.Append;					


Was soll das Append ? Einfügen : Insert. Ändern : Edit. Löschen : Delete.

_________________
Gruß
Hansa
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 19.10.05 07:51 
@Hansa:
Append hängt einen DS an. Insert fügt an der aktuellen Stelle einen Neuen ein. Wobei das sicher nicht bei jeder DB so funktioniert. Aber grundsätzlich gibt es beide Methoden.
Lake
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78


D6 prof., Delphi 10.2 Tokyo
BeitragVerfasst: Mi 19.10.05 07:54 
Willst Du eine neues Datenbankfeld anlegen, also die Struktur der DB erweitern?
japetos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Mi 19.10.05 13:07 
ich habe ein Feld mit dem titel files.
in diesem feld sollen pro ID mehere files, quasi in einem Textfeld gespeichert werden.

mit dem schnippsen den ich oben angegeben habe gehts nicht. da wird dann einfach ueberschrieben. Daher dachte ich 'Append'.
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 19.10.05 13:23 
Also entweder mahcst du das, indem du in den Edit-Modus gehst und das Feld ergänzt oder, du machst eine reguläre 1:n-Beziehung daraus und legst eine zweite Tabelle dafür an.
japetos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Mi 19.10.05 13:25 
Ja, ich moechte es ergaenzen. Aber es klappt nicht. Der alte Wert wird einfach ueberschrieben
Lake
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78


D6 prof., Delphi 10.2 Tokyo
BeitragVerfasst: Mi 19.10.05 13:33 
ausblenden Delphi-Quelltext
1:
2:
3:
KAAdoTable1.edit;
KAAdoTable1.FieldByName('files').AsString := concat(KAAdoTable1.FieldByName('files').AsString, p);
KAAdoTable1.post;
japetos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Mi 19.10.05 13:42 
Ja, vielen Dank. So gehts.
Letzte Frage, versprochen.
Wie bekomme ich jetzt noch einen Zeilenumbruch rein?
Geht sowas ueberhaupt?

Merci nochmal
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 19.10.05 14:03 
ausblenden Delphi-Quelltext
1:
2:
3:
KAAdoTable1.edit;
KAAdoTable1.FieldByName('files').AsString := KAAdoTable1.FieldByName('files').AsString + #13#10 + p;
KAAdoTable1.post;
japetos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57



BeitragVerfasst: Mi 19.10.05 14:18 
Hey Danke!!!!

IHR SEID DIE BESTEN!!!!