Autor Beitrag
rushtone
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: So 14.01.07 03:01 
Hi, ich hab ne frage, arbeite fleißig an einem rechnungsprogramm..
so ich hab die componente monthcalendar und möchte wenn ich auf ein datum klicke das mit im dbgrid nur die datensätze angezeigt werden die dem datum in monthcalendar entsprechen..

soweit kein problem..
nur wenn ich ein datum im monthcalendar anklicke gibts eine fehlermeldung in der steht das ein ungültiges zeichen für die filteroperation genommen wurde..
und zwar der punkt.. also 12.01.2007 zb, da bekomm ich die fehlermeldung das der . zwischen der 12 und der 01 ein feheler ist..

nun gut wie bekomm ich das nun hin?

jemand ne idee?
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: So 14.01.07 12:00 
HI

Probiers mal im Filter, dass du das Datum in Anfürungszeichen setz, quasi als String.

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
rushtone Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: So 14.01.07 13:48 
user profile iconXion hat folgendes geschrieben:
HI

Probiers mal im Filter, dass du das Datum in Anfürungszeichen setz, quasi als String.

ja hab ich auch schon probiert..
geht nicht..

muss aber doch möglich sein, das man anhand des datum sortieren kann oder?

das ist mein code bisher, das ganze findet statt bei einem ereignis und zwar bei monthcalendar1.click

table1.Filtered:=True;
table1.Filter:='Datum='+datetostr(monthcalendar1.date);

fehlermeldung unzulässiges filter
zeichen: '.'
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: So 14.01.07 14:41 
also, habs grad mal probiert, so gehts bei mir:

Datum='1.1.1'

also als Code:

table1.Filter:='Datum='''+datetostr(monthcalendar1.date)+'''';

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
rushtone Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: So 14.01.07 16:16 
user profile iconXion hat folgendes geschrieben:
also, habs grad mal probiert, so gehts bei mir:

Datum='1.1.1'

also als Code:

table1.Filter:='Datum='''+datetostr(monthcalendar1.date)+'''';


oh mann.. klar.. *tomaten auf den augen*
peinlich, vielen dank.. es klappt hervorragend..
an die blöden ' hab ich gar nicht mehr gedacht.. ;)