从C#或VB.Net创建并执行MySQL脚本 [英] Create and execute MySQL script From C# or VB.Net

查看:108
本文介绍了从C#或VB.Net创建并执行MySQL脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多查询需要逐个执行。我使用

I have so many queries that have to be executed one by one. i did it by using

using (OdbcConnection connection = new OdbcConnection(Connectionstring))
   {
      using (OdbcCommand queryCommand = connection.CreateCommand())
        { }
      using (OdbcCommand queryCommand = connection.CreateCommand())
        { }
   }





我认为如果我可以将这些查询序列作为脚本执行,那会更有帮助。他们是否有可能像脚本那样执行这样的查询序列。并且还必须使用事务。



I think it is more helpful if i can execute these sequence of queries as a script. Is their any possibility to execute such sequence of queries as a script. and have to use transaction also.

推荐答案

看看这个 http:/ /dev.mysql.com/doc/refman/5.5/en/connector-net-info.html [ ^ ]


这篇关于从C#或VB.Net创建并执行MySQL脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆