How to execute *.sql mysql file in my c# application

后端 未结 4 1249
后悔当初
后悔当初 2021-01-02 16:38

I have a mysql script in a file that I need to be able to execute from my c# application. Here is a sample of what the script contains:

USE osae;

-- Set DB         


        
4条回答
  •  一生所求
    2021-01-02 17:12

    I am not 100% sure what native MySql syntax is, but when we perform similar functionality for Sql Server, we have to break the sql file into chunks based on the literal values (GO) that are only used by the query executor (Sql Server Management Console).

    I suspect there may be similar information embedded in your request above, such as the DEFINE statement.

    Knowing exactly what MySql complained about would help refine the solution.

提交回复
热议问题