lock table after BeginTransaction MySql Transaction in c#.net
问题 How do i restrict other users to update or insert in a table after a certain transaction has begun ? I tried this : MySqlConnection con = new MySqlConnection("server=localhost;database=data;user=root;pwd=;"); con.Open(); MySqlTransaction trans = con.BeginTransaction(); try { string sql = "insert INTO transaction_ledger (trans_id,voucher_id,voucher_number,trans_date,ledger_code,company_code,trans_type, trans_amount,primary_ledger,narration,ledger_parent,trans_type_name,ledger_ref_code,r_trans