Autor Beitrag
Grave_digger
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Di 04.03.03 15:52 
ich möchte gerne das nur bestimmte Datensätze angzeigt werden aber ohne SQL zu benutzen

MFG
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Di 04.03.03 16:15 
hallo grave_digger!


ausblenden Quelltext
1:
2:
3:
4:
5:
{$UNTESTED}
table1.filter:= 'Feld1 = 'irgendwas' AND Feld2 > 15';
table1.filtered:= true;

table1.filtered:= false;         hebt den filter wieder auf...


mfg, stefan
Grave_digger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Di 04.03.03 16:28 
ich verwende Interbase und bekomme das filtern auch mit deinem Quelltext leider nicht hin
ich bekomme immer eine Fehlermeldung:

Dynamic SQL Error
SQL error code = -206
Column unknow.
Quelldatei

Quelldatei ist meine Variable.

mfg
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Di 04.03.03 16:49 
tut mir leid, ich kann kein interbase.
so was solltest aber in deinem beitrag vermerken, wenn du mit anderen als den delphi-standardsachen arbeitest.

moment... 'Column unknow'

du tippst schon die bezeichnung deiner tabelle und deiner felder hin und hast nicht etwa 'table1' und 'feld1 & feld2' übernommen? ;)
seh ich das richtig?

Zitat:
Quelldatei ist meine Variable.

das finde ich gut.
welche variable denn? dein table etwa?

mfg, stefan
Grave_digger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Di 04.03.03 17:20 
keine angst das mach ich schon mein Quell siehst wie folgt aus;
ausblenden Quelltext
1:
2:
IBTable1.Filter:= 'anwortpfad = Quelldatei';
IBTable1.Filtered := True;

und in Quelldatei ist ein wert für die ich alle datensätze haben will die in der Datenbank stehen

mfg

Moderiert von user profile iconTino: Code-Tags hinzugefügt.
Grave_digger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Di 04.03.03 17:47 
das filtern funktioniert
aber nur so das habe ich schon hin bekommen
IBTable1.Filter:= 'anwortpfad= "C:\Stephan\Projekt\Fragen\Texte\cpuhist.htm"';

IBTable1.Filtered := True;

aber ich brauch die Variable und keine Festwerte

mfg
Sven
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314


D6 Ent, K3 Pro (patched)
BeitragVerfasst: Di 04.03.03 18:00 
Probiers doch mal mit

ausblenden Quelltext
1:
IBTable1.Filter:= 'anwortpfad = '+QuotedStr(Quelldatei);					


Sven

_________________
MDK 9.1, Kernel 2.4.21, KDE 3.1 Kylix 3 Pro (patched), nutze aber auch Windows
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Di 04.03.03 18:03 
das hast ja wieder net gesagt, dass du nach dem inhalt einer variablen suchen willst *tz tz tz*

probiers mal so:
ausblenden Quelltext
1:
 IBTable1.Filter:= 'anwortpfad = ' + '''' +  Quelldatei + '''';					
Sven
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314


D6 Ent, K3 Pro (patched)
BeitragVerfasst: Di 04.03.03 18:06 
@grayfox
ich glaub Du hast gerade die etwas andere Variante von dem gepostet, was ich gepostet habe.

_________________
MDK 9.1, Kernel 2.4.21, KDE 3.1 Kylix 3 Pro (patched), nutze aber auch Windows
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Di 04.03.03 18:09 
mhm, ich habs auch schon gesehen! :)
das nächstemal versuch ich's auch mit QuotedStr.

mfg, stefan
Grave_digger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Di 04.03.03 18:20 
Ich bedanke mich rechtherzlich bei euch ihr habt mir weitere stunden voll Stress erspart

mfg
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Di 04.03.03 18:21 
na na.. so schlimm wirds ja wohl nicht gewesen sein ;)
das nächste mal gerne wieder!

mfg, stefan
Grave_digger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Mi 05.03.03 08:44 
Glaub mir so schlimm war es ich war schon dem Irrenhaus nahe

mfg