Autor Beitrag
podi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43

Win XP, Delphi 7,

BeitragVerfasst: Fr 13.10.06 09:11 
Hallo!
wie kann man eine TListView auslesen (Daten schon drin) und dann an eine SQL Datenbank weiterleiten?


Besten Dank!
Matthias-K
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Mo 16.10.06 10:03 
na in ner schleife durchgehen und dann per sql befehl in die db schreiben! wo soll denn das problem sein?

mfg matthias

_________________
Ein Spezialist ist ein Mensch, der immer mehr von immer weniger weis, bis er alles von nichts weis!
podi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43

Win XP, Delphi 7,

BeitragVerfasst: Mo 16.10.06 17:08 
Das glaube ich dir schon, leider bin ich nicht so SQL geschult...:o(
Kannst du mir nicht ein Beispiel mit Code nennnen, wäre dir sehr dankbar!!

_________________
Freundliche Grüsse
Jukka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 107

Win XP Pro
Delphi 7
BeitragVerfasst: Mo 16.10.06 17:22 
Das gleiche hab ich auch gemacht,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
var li: TListItems;
begin

li := listview1.Items;
Form2.name.Text := li.Item[ListView1.ItemIndex].Caption; // Feld 1
Form2.genre.Text := li.Item[ListView1.ItemIndex].SubItems.Strings[0];// Feld 2
Form2.autor.Text := li.Item[ListView1.ItemIndex].SubItems.Strings[1];// Feld 3
Form2.price.Text := li.Item[ListView1.ItemIndex].SubItems.Strings[2];// Feld 4
Form2.count.Text := li.Item[ListView1.ItemIndex].SubItems.Strings[3];// Feld 5
Form2.maxcount.Text := li.Item[ListView1.ItemIndex].SubItems.Strings[4];// Feld 6
// jeweils angeklickten datensatz speichern 
end;


Bei mirhab ich es in eine variable geschreiben du musst das halt in tabellenfelder schreiben bzw querys erzeugenund dann loschiken ganz einfach ^^