How do I import mysql source file via ADO.NET
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.
精彩评论