Should I use ExecuteNonQuery for this db backup command

后端 未结 8 925
迷失自我
迷失自我 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:08

    ExecuteNonQuery() 
    

    should be fine to use here. What I would do is run a try catch around the using to catch any errors that might happen and deal with them appropiately.

提交回复
热议问题