dbTalk Databases Forums  

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

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


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



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

Default Re: Passing DateTime object to template query (i realy need help, - 04-21-2005 , 08:15 AM






Cableguy wrote:
Quote:
result=query.store(SQLString(lastLogon)); //this doesn't work
What happens when you run this:

cout << lastLogon << endl;
cout << string(lastLogon) << endl;
cout << SQLString(lastLogon) << endl;

--
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
  #2  
Old   
Cableguy
 
Posts: n/a

Default Re: Passing DateTime object to template query (i realy need help, - 04-21-2005 , 08:29 AM






error C2440: 'type cast' : cannot convert from 'mysqlpp:ateTime' to
'std::basic_string<_Elem,_Traits,_Ax>'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char>
]

error C2440: 'type cast' : cannot convert from 'mysqlpp:ateTime' to
'mysqlpp::SQLString'


Using VS 2003 and mysql++ 1.7.32

--
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
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: Passing DateTime object to template query (i realy need help, - 04-21-2005 , 10:24 AM



Cableguy wrote:

Quote:
error C2440: 'type cast' : cannot convert from 'mysqlpp:ateTime' to
'std::basic_string<_Elem,_Traits,_Ax>'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char
]

error C2440: 'type cast' : cannot convert from 'mysqlpp:ateTime' to
'mysqlpp::SQLString'


Using VS 2003 and mysql++ 1.7.32
Your mission, then, is to find out why this code from lib/datetime.h
does not work:

inline mysql_dt_base:perator std::string()
{
return stream2string<std::string>(*this);
}


--
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
  #4  
Old   
Cableguy
 
Posts: n/a

Default Re: Passing DateTime object to template query (i realy need help, - 04-23-2005 , 04:54 AM



@ Chris

Is it realy compiling? What OS/compiler/project are you using? Tell me
everything

@ Warren

How the hell am I supposed to do that???

@ Jesper

datetime.h is included somewhere because if it wasn't compiler would say
something when I try to declare DateTime lastLogon

result=query.store(lastLogon); // error C2664: 'mysqlpp::Result
mysqlpp::Query::store(const char *)' : cannot convert parameter 1 from
'mysqlpp:ateTime' to 'const char *'


I have no idea how is SQLString defined

--
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.