Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 29.06.05 08:58 
Ich hab ein Problem mit meinem DBGrid.
Ich hab ein Select-Statement:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
selectstr :=    'SELECT M.Name,M.Vorname,K.Name as Spezialitaet , M.TagUhrvon as Von, ' +
                'M.TagUhrbis as Bis, M.NLnr as BST, M.MAnr, O.Name as Aufenthalt, '+
                'A.Datum, A.UHRZEITVON, A.UHRZEITBIS, A.MANR ' +
                'FROM Mitarbeiter M, MAKenntnisse MAK, Kenntnisse K, Ort O, Anwesenheit A ' +
                'WHERE A.UHRZEITVON<='''+TimeTostr(time())+''' AND '''+TimeToStr(time())+'''<=A.UHRZEITBIS ' +
                'AND A.DATUM='''+DateToStr(date())+''' AND A.MANR=M.MAnr ' +
                'AND MAK.Kentnr=K.Kentnr AND M.MAnr=MAK.MAnr ' +
                'AND M.Ortnr=O.Ortnr AND K.Name IN ('+ zusammen + ')' +
                ' ORDER BY M.Name, K.Name;';

und hab ein DBGrid zu gesetzt. Allerdings wird mir in diesem DBGrid viel zuviel angezeigt. nun wollte ich die Auswahl beschränken, hab unter Columns nur 4 Felder eingegeben, nun funktioniert allerdings irgendwie nix mehr. Muss ich denn die Spalte als M.name eintragen, oder wie geht das normal??
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 29.06.05 09:02 
Vernün#ftiger ist es deine SQL abfrage anzupassen
zB: m.Name as Name,M.Vorname as Vorname, ....

mfg
MILLI
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 29.06.05 09:09 
und dann muss ich in den Columns Name, Vorname usw. eingeben, oder?? Also ganz normal??
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 29.06.05 09:17 
so geht das aber irgendwie auch nicht wirklich.
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 29.06.05 11:19 
Was genau geht denn nicht verwende es immer so und funkt bei mir ohne Probs

screenshot oder grid defs?

mfg
MILLI
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 29.06.05 12:22 
Ich kann leider kein Screenshot hochladen, da macht unsere Firmen-Firewall nicht ganz mit.
Also ich hab das DBgrid auf eine DataSource gesetzt. Funktionert auch ganz gut.
Wenn ich nun die Columns eintragen will zeigt er mir aber dann gar nix mehr an.
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 29.06.05 12:25 
Zur Designzeit ist nur was zu sehen wenn die query active ist. einfach die namen der Columns eintrage (weißt ja wie sie heißen) sollte dann zur Laufzeit funken

mfg
MILLI
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 29.06.05 12:37 
eben das funktioniert nicht.
Ich muss mir das ganze nochmal in Ruhe anschauen, vielleicht find ich ja raus an was es gelegen hat.