Autor Beitrag
Mr.Anderson
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: So 24.08.03 10:45 
ist es möglich von einem pulldown-menü auf eine spalte einer datenbank-tabelle zuzugreifen?

ich konnte bisher mit einer dbcombobox einen wert einer tabelle anzeigen lassen, ich würde aber gerne eine ganze spalte anzeigen lassen?
ich hoffe ich habe mich verständlich ausgedrückt.

dank an alle helfenden!!!!!!
z1dirk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: So 24.08.03 16:21 
Hi, ich weis nicht so genau was du meinst, doch so kannst du in der combobox mehrere Werte sehen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
type
  Tartikel = record
              nr:integer;
              name:string[35];
             end;


procedure TForm1.comboboxfuellen;
var datei: file of Tartikel;
    n:integer;
    artikel:Tartikel;
    pos:integer;
begin
     assignfile(datei,'daten.dat');
     reset(datei);
     pos:= filesize(datei)-1;
     for n:=0 to pos do
         begin
         seek(datei,n);
         read(datei,artikel);
         Combobox1.items.add(artikel.name+IntToStr(artikel.nr));
         end;
     closefile(datei);
     
end;


Gruß Dirk