在Windows-C#中从字符串或文件执行多个Mysql查询 [英] Execute Multiple Mysql Queries from string or file in Windows-C#
本文介绍了在Windows-C#中从字符串或文件执行多个Mysql查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在文件中有多个mysql查询(例如创建多个表).
实际上,我想在Windows C#应用程序中执行它们,以便在新创建的数据库中创建表.我可以创建新的数据库.
所以为了做到这一点,我已经从文件中获取了内容到一个字符串.现在的任务是执行字符串...我不知道如何,你能帮我吗?方案
嗨
请参阅此链接.
http://social.msdn.microsoft.com/Forums/zh/adodotnetdataproviders/thread/43e8bc3a-1132-453b-b950-09427e970f31
然后相应地更改数据连接器.
Hi,
I''ve multiple mysql queries(like to create multiple tables) in file.
Actually i wanna execute them in windows c# app so that i create tables in new created DB. I''m able to create new DB.
So in order to do this i have fetched the contents from file to a string.Now the task is to execute the string...I don''t know how, Can u help me?
解决方案
Hi
Refer this link.
http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/43e8bc3a-1132-453b-b950-09427e970f31
And change your data connector accordingly.
这篇关于在Windows-C#中从字符串或文件执行多个Mysql查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文