更新时间:2023-02-26 19:06:31
仅仅因为你设置了一个连接到 command.Connection 并不意味着它被设置了.
Just because you set a connection to command.Connection does not mean it is set.
command.Connection = connection;
command.Connection.GetHashCode() == connection.GetHashCode(); // may return false.
这就是问题的原因.可以通过使用 connection.CreateCommand();
This is the cause of the problem. Can be corrected by using connection.CreateCommand();