Rollback in webmatrix RRS feed

  • Question

  • User-1378722245 posted


    I have below multiple execute using dynamic SQL statement i need to roll back if any one of the SQL statement fails. How can i rollback it ?

    var db = WebMatrix.Data.Database.Open("MyConnectionString");

    var data = db.Execute("update table1 set column1 = 'very difficult to rollback' where id = 007");

    var data = db.Execute("insert into movies (ID, Name) Values (007, 'New Bond'));

    Thanks in advance 


    Sunday, May 22, 2016 10:17 AM


  • User1853794821 posted

    Unfortunately, the WebMatrix Database helper does not support transactions


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 22, 2016 1:53 PM