I am sorry I didn't see this email.I will try it soon.
Thanks.
陈抒
Best regards
http://blog.csdn.net/sheismylife
On Fri, Jul 29, 2011 at 3:32 AM, Artyom Beilis <art...@ya...> wrote:
>
> To: cpp...@li...
> >Sent: Thursday, July 28, 2011 5:21 PM
> >Subject: Re: [Cppcms-users] How to call MySQL store procedure
> >
> >
> >It seems that CPPDB doesn't support store procedure for now. Any plan for
> this?
> >I have to use MySQL++ now.
> >陈抒
> >Best regards
> >http://blog.csdn.net/sheismylife
> >
> >
>
>
> Do you have any specific problems calling stored procedures?
>
> See: http://dev.mysql.com/doc/refman/5.5/en/call.html
>
> I don't see something specific that would prevent from executing
>
> "CALL " statement or query.
>
> This example from the site:
>
> mysql_query(mysql, "SET @increment = 10");
> mysql_query(mysql, "CALL p(@version, @increment)");
> mysql_query(mysql, "SELECT @version, @increment");
> result = mysql_store_result(mysql);
> row = mysql_fetch_row(result);
> mysql_free_result(result);
>
> Can be executed as;
>
>
> sql << "SET @increment = 10" << cppdb::exec;
> sql << "CALL p(@version, @increment)" << cppdb::exec;
> cppdb::result r = sql << "SELECT @version, @increment";
>
> By default CppDB uses prepared statements, if you want unprepared onces
> (I don't know if mysql requires unprepared statements for such things)
> you may call
>
> sql.create_statement("SET @increment = 10").exec();
> sql.create_statement("CALL p(@version, @increment)").exec();
> cppdb::result r = sql.create_statement("SELECT @version, @increment");
> If you have any specific problems using CALL syntax tell
> exactly what you are doing and probably provide a simple
> use case that shows the problem.
>
>
> Artyom
>
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
|