From: Warren Young Date: June 27 2008 4:16am Subject: Re: sql_create_ macro List-Archive: http://lists.mysql.com/plusplus/7708 Message-Id: <48646992.3090104@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Soul Boy wrote: > I guess you mean this ? > > sql_create_3(TableRow, > 1, 3, > mysqlpp::String, A, > mysqlpp::String, B, > mysqlpp::String, C); Yes, that's what I wanted to see from the start. But, it works fine for me. Here's a diff of examples/ssqls1.cpp modified to do what you said doesn't work in an earlier post: --- examples/ssqls1.cpp (revision 2285) +++ examples/ssqls1.cpp (working copy) @@ -33,11 +33,21 @@ #include #include +sql_create_3(TableRow, + 1, 3, + mysqlpp::String, A, + mysqlpp::String, B, + mysqlpp::String, C); + using namespace std; int main(int argc, char *argv[]) { + string a("foo"), b("bar"), c("qux"); + TableRow tr1(mysqlpp::String(a), mysqlpp::String(b), + mysqlpp::String(c)); + // Get database access parameters from command line const char* db = 0, *server = 0, *user = 0, *pass = ""; if (!parse_command_line(argc, argv, &db, &server, &user, &pass)) { As you can see, all I've done is drop your SSQLS declaration in at the top of this file, in global scope, and declare one of these TableRows, populating the members from std::string. This compiles just fine. I recommend you try replicating what I've done here, also using the MySQL++ examples as a base to work from. Then continue to modify the example until it gives the error you're seeing, and send the modified example to the list, along with the error messages.