List:MySQL++« Previous MessageNext Message »
From:Joachim Person Date:March 12 2005 2:54am
Subject:understanding of sql_create_#
View as plain text  
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, 1, 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?

 



Thread
understanding of sql_create_#Joachim Person12 Mar