dbTalk Databases Forums  

understanding of sql_create_#

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


Discuss understanding of sql_create_# in the mailing.database.mysql-plusplus forum.



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

Default understanding of sql_create_# - 03-12-2005 , 06:17 AM






------=_NextPart_000_000D_01C52705.E326AE90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

When having







sql_create_1(user, 1, 1, string, ip)







I get compilation errors saying







error C2535: 'void user::set(const std::string &)' : member function already
defined or declared MySQLCommunicator.cpp(10) : see declaration of
'user::set'



error C2535: 'user::user(const std::string &)' : member function already
defined or declared MySQLCommunicator.cpp(10) : see declaration of
'user::user'







And when I have







sql_create_1(user, 1, 0, string, ip)







I get compilation an error saying







error C2664: 'user::set' : cannot convert parameter 1 from 'const char [4]'

to 'const mysqlpp::Row &'



Reason: cannot convert from 'const char [4]' to 'const mysqlpp::Row'



No constructor could take the source type, or constructor overload
resolution was ambiguous







on the usr.set("APA") line below







Query query = connection->query();



user usr;



usr.set("APA");







I feel that I have done exactly as the example custom2, which follows

mysql++. I have not used / declared / defined this function anywhere else.

What could this error depend on?



AfaIk the second parameter tells something about comparison (I don't know
what exactly though) and the third parameter



tells how many members that will be initialised.



Also - How can I convert a CString into the std::string type?


------=_NextPart_000_000D_01C52705.E326AE90--



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.