为什么EndExecuteNonQuery()需要的? [英] Why is EndExecuteNonQuery() Needed?

查看:377
本文介绍了为什么EndExecuteNonQuery()需要的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档这里指出

开发人员必须调用
  EndExecuteNonQuery方法完成
  操作

developers must call the EndExecuteNonQuery method to finish the operation.

我一直没能找到一个很好的理由,为什么这是,或什么不是叫 EndExecuteNonQuery 的结果。

I have not been able to find a good reason as to why this is, or what the results of not calling EndExecuteNonQuery are.

任何有识之士来,如果它不叫会发生什么?我不希望它阻止,有没有办法为它在被自动调用的AsyncCallback

Any insight as to what will happen if it is not called? I don't want to block on it, is there a way for it to be automatically called in an AsyncCallback?

推荐答案

这会做这样的事情:


  • 更新的参数值(出/返回)

  • 检查异常(错误codeS的TDS流中 - 违反约束等)

  • 释放缓冲作为上述等的一部分的任何对象/数据

所以,是的:做

这篇关于为什么EndExecuteNonQuery()需要的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆