当前位置:Gxlcms > 数据库问题 > MySql执行多条语句

MySql执行多条语句

时间:2021-07-01 10:21:17 帮助过:4人阅读

  • mysql_real_connect( ..., CLIENT_MULTI_STATEMENTS );  
  • //或者  
  • //中途指定  
  • mysql_set_server_option( mysql, MYSQL_OPTION_MULTI_STATEMENTS_ON ); //mysql是连接的名称  
  • 但是C#的驱动,没有找到设置的地方。

    搜遍源码也没有。

    在 http://www.connectionstrings.com/mysql/ 查到可以在连接字符串中指定:AllowBatch,默认为True。

    Server=127.0.0.1;Database=MyMvcApp;Uid=root;Pwd=root;Pooling=True;MinimumPoolSize=10;maximumpoolsize=500;ConnectionLifeTime=300;ProcedureCacheSize=0;default command timeout=20;Connection Timeout=5;CharSet=utf8;AllowBatch=True;

    待测。

    MySql执行多条语句

    标签:

    人气教程排行