mikha
asked on
transaction in asp.net, sql server
say if i need to execute an select and update statement, first I select a value from a table and update/insert another row using the value from the first select statement in the same table. Do i need to execute both sql statements inside a transaction from my C# code? or i don't need transcationScope here because one is a select statement.
using(TransactionScope tran = new TransactionScope()) {
//select statement
//insert statement
tran.Complete();
}
using(TransactionScope tran = new TransactionScope()) {
//select statement
//insert statement
tran.Complete();
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.