我可以在一个SqlConnection上使用的SqlCommands数量是否有限制?
即
SqlConnection myConn = new SqlConnection();
myConn.ConnectionString = myConnectionString.ConnectionString;
SqlCommand myComm1 = new SqlComm("INSERT...");
SqlCommand myComm2 = new SqlComm("SELECT...");
SqlCommand myComm3 = new SqlComm("UPDATE...");
SqlCommand myComm4 = new SqlComm("UPDATE...");
SqlCommand myComm5 = new SqlComm("UPDATE...");
...
myConn.Open();
object confirmID1 = sqlComm1.ExecuteScalar();
object confirmID2 = sqlComm2.ExecuteNonQuery();
object confirmID3 = sqlComm3.ExecuteNonQuery();
object confirmID4 = sqlComm4.ExecuteNonQuery();
object confirmID5 = sqlComm5.ExecuteNonQuery();
...
myConn.Close();
当然,我并没有尝试更新第一个命令中INSERTED的任何内容。