G
Guest
Hello,
I'm using SqlDataAdapter to insert data from one table into another with
SqlCommand after I start a transaction.
If I have convertion error for the insertion of the data, The transaction is
no longer valid, I'ts rolled back.
Is there a property to leave the transaction open ?
my code :
SqlTransaction trans = m_Conn.BeginTransaction();
SqlCommand oCmd1 = new SqlCommand("Insert into tbl1(col1) select col1 from
tbl2", m_Conn);
oCmd1.Transaction = trans;
oCmd1.ExecuteNonQuery();
Thanks,
Sharon
I'm using SqlDataAdapter to insert data from one table into another with
SqlCommand after I start a transaction.
If I have convertion error for the insertion of the data, The transaction is
no longer valid, I'ts rolled back.
Is there a property to leave the transaction open ?
my code :
SqlTransaction trans = m_Conn.BeginTransaction();
SqlCommand oCmd1 = new SqlCommand("Insert into tbl1(col1) select col1 from
tbl2", m_Conn);
oCmd1.Transaction = trans;
oCmd1.ExecuteNonQuery();
Thanks,
Sharon