SqlDataReader dr= cmd.ExecuteReader(CommandBehavior.CloseConnection)

这种写法可以直接在关闭了dr的时候对于connection也同时进行关闭~

相关文章:

  • 2021-05-28
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
  • 2021-05-29
猜你喜欢
  • 2021-06-23
  • 2021-10-19
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-09-25
相关资源
相似解决方案