 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
aysan ethem Guest
|
Posted: Thu Jul 06, 2006 2:07 pm Post subject: expecting:String actual Date |
|
|
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... |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|