sql - How to set isolation level on SqlCommand/SqlConnection initialized with no transaction -
the following method supposed peroform dirty read on open connection. there no transactions. set isolationlevel?
public string dodirtyread(string storedprocname, sqlconnection connection) { using (sqlcommand command = new sqlcommand(storedprocname, connection)) { command.commandtype = commandtype.storedprocedure; // how set isolationlevel read_uncommitted here? command.executenonquery(); } }
on begintransaction method: (msdn link)
and if want use hints in sp @ table level, use with(nolock) - use @ own risk.
Comments
Post a Comment