Executing a SQL script stored as a resource

后端 未结 4 963
庸人自扰
庸人自扰 2020-12-10 11:38

I would like to store lengthy .sql scripts in my solution and execute them programmatically. I\'ve already figured out how to execute a string containing my sql script but I

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 11:56

    Add file to Resources, and set file to Resource, in code write:

    String SQLCommand = NAMESPACE.Properties.Resources.ScriptDB.ToString()
    

提交回复
热议问题