Should I use ExecuteNonQuery for this db backup command

后端 未结 8 882
迷失自我
迷失自我 2021-01-17 03:26

I have a method that allows me to kick off a back up of a data base. What I am wondering is if I should be using ExecuteNonQuery() in this context or if there is something

8条回答
  •  花落未央
    2021-01-17 04:25

    This does look like the type of thing you should put in a stored procedure to do some error handling.

    Also, have a look here to see it done in code.

提交回复
热议问题