dbTalk Databases Forums  

Passing DateTime object to template query (i realy need help, this

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Passing DateTime object to template query (i realy need help, this in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cableguy
 
Posts: n/a

Default Passing DateTime object to template query (i realy need help, this - 04-21-2005 , 05:09 AM






I asked this question on mysql, cprogramming and codeguru forums and had
no answers. So i guess this is my last chance... if you can't help me
then nobody can (since you are developing mysql++).

DateTime lastLogon=row.lookup_by_name("LogonTime");
query<<"SELECT * FROM Posts WHERE CreationTime>%0q";
query.parse();

Template query is set, so when i execute it it works just fine (in this
case):
result=query.store(SQLString("2005-03-03 12:00:00"));

But that's not what i want, I don't want to pass date & time as a
string, I wanna pass it as DateTime object lastLogon but don't know how
to convert it...

result=query.store(SQLString(lastLogon)); //this doesn't work



I'm realy new to this and i've searched mysql++ documentation but just
couldn't find the answer

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.