已有打开的与此命令相关联的 DataReader,必须首先将它关闭。

 command.CommandText = "";
                        SqlDataReader READER = command.ExecuteReader();
                        while (READER.Read())
                        {
                            command.CommandText = "";
                            command.ExecuteNonQuery();
                        }
                        READER.Close();

你可能感兴趣的:(reader)