Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

expecting:String actual Date

0 views
Skip to first unread message

aysan ethem

unread,
Jul 6, 2006, 5:07:02 AM7/6/06
to
hi.
I am trying to execute the following query but I get the exception
edatabase error ... type mismatch ... field:LogDate expecting:String
actual:Date
what can I do?

.....................
TDateTimePicker *From;
TDateTimePicker *To;
TComboBox *FromHour;
TComboBox *FromMinute;
TComboBox *ToHour;
TComboBox *ToMinute;
......................

Query1->SQL->Text = "SELECT * FROM log.DB L WHERE L.LogDate >='"
+DateToStr(From->Date)+"' AND "+
"L.LogDate <= '"+DateToStr(To->Date)+"' AND "+
"L.LogTime >= '"+StrToTime(FromHour->Text+":"+FromMinute->Text)+"' AND
"+
"L.LogTime <= '"+StrToTime(ToHour->Text+":"+ToMinute->Text)+
"order by L.TerminalNo";

when I run it in sql explorer as
select * from log.DB L where L.LogDate >= '06.06.2006' and L.LogDate <=
'27.06.2018' and L.LogTime >= '00:00:00' and L.LogTime <= '00:00:00'
order by L.TerminalNo
it works

thanks...

0 new messages