Hi,
In my codes:
=======================================
myConn.Open();
SqlTransaction MyTrans= myConn.BeginTransaction();
SqlCommand myCommand = new SqlCommand("ZZZ15UserLog",myConn);
myCommand.CommandType= CommandType.StoredProcedure;
SqlDataReader myReader;
myCommand.Transaction=MyTrans;
try
{
myCommand.ExecuteReader();
MyTrans.Commit();
}
catch { }
========================================
That will result in some error, however, if I change the ExecuteReader() to
ExecuteNonQuery(),
it will be fine.
Would someone tell me what have I done wrong with my code?
Thanks for help.
Jason