c# - transaction locks in MySqlHelper class -
I am going to call mysql db in my .net code and for this i My question: You can use the ### transaction. mysql.data.dll . In my scenario I used the
MySqlHelper class but in this scenario there are two inputs and I want to record
commit if only if both are correctly inserted otherwise I
rollback want
internal boolean addcutomer (customer c) {string sqlCustomerQuery = "tab controller value (" + + c.barcode + ", '" + c .custxml + "''); Int results = MySqlHelper.ExecuteNonQuery (connectionString, sqlCustomerQuery); if (result> 0) {string sqlProjCustomer =" tab_pr Insert in oject_customersVALUES ('"+ c.barcode +' ','" + c.ProjectID + "')"; MySqlHelper.ExecuteNonQuery (connectionString, sqlProjCustomer); Back true; } And false return; }
MySqlHelper class method?
Comments
Post a Comment