BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

expecting:String actual Date

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases
View previous topic :: View next topic  
Author Message
aysan ethem
Guest





PostPosted: Thu Jul 06, 2006 2:07 pm    Post subject: expecting:String actual Date Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.