S
Shimon Sim
Hi I have following code
public void Functon1()
{
SqlTransaction trans=CreateTransaction();
//Do something with it
trans.Commit();
}
private SqlTransaction CreateTransaction()
{
SqlConnection con=new SqlConnection("some connection string");
return con.BeginTransaction();
}
I just wanted to know what will happen with my Connection. Will it be still
open or not?
trans.Connection property is always null after I commit the transaction.
Does it mean anything?
Thanks, Shimon.
public void Functon1()
{
SqlTransaction trans=CreateTransaction();
//Do something with it
trans.Commit();
}
private SqlTransaction CreateTransaction()
{
SqlConnection con=new SqlConnection("some connection string");
return con.BeginTransaction();
}
I just wanted to know what will happen with my Connection. Will it be still
open or not?
trans.Connection property is always null after I commit the transaction.
Does it mean anything?
Thanks, Shimon.