开发者

How do I import mysql source file via ADO.NET

开发者 https://www.devze.com 2023-01-19 20:44 出处:网络
I\'m writing an app which should take a sql file generated from mysqldump and import it into a m开发者_JAVA技巧ysql database.Is there a way to do this from ADO.NET or do I need to use the mysql cli?Yo

I'm writing an app which should take a sql file generated from mysqldump and import it into a m开发者_JAVA技巧ysql database. Is there a way to do this from ADO.NET or do I need to use the mysql cli?


You should be able to do this from ADO.NET by reading the file into a string and executing the string against the database, assuming that you have the ADO.NET connector for mysql.

I don't know what advantage you gain by doing that, and if you don't know the input well, you're asking for trouble, but it should be possible.

0

精彩评论

暂无评论...
验证码 换一张
取 消