关于.net交易 [英] About .net transaction
问题描述
我正在使用.net 3.5,其中在我的一个应用程序中我使用了DB2Transaction类,所以我使用了带有begin transaction方法的语句。所以在那之后我通过dbtransaction.commite()进行了转换;所以现在我想为
dbtransaction对象本身分配空值。总之,即使我使用USING语句,我也想要处理对象。 somebuddy可以指导我吗
I am using .net 3.5 in which in one of my application i have used DB2Transaction class so in that i used using statement with begin transaction method. so after that i comitted transation by dbtransaction.commite(); so now i want to assign null value to dbtransaction object itself. in short i want dispose the object even though iam using USING statement. Can somebuddy please guide me
dbtransaction = null;这个dbtransaction也是
DB2Transaction 类的对象。
dbtransaction=null; is not working also this dbtransaction is the object of DB2Transaction class.
推荐答案
我不确定你是如何使用USING语句的。根据我的知识,如果您离开USING块,USING中宣布的组件将自动处理。您无需手动处理它。如果可能,请发布您的代码。讨论这个问题可能很方便
。
I am not sure how you use the USING statement. Based on my knowledge, if you leave the USING block, the component announced in USING will be disposed automatically. You do not need to manually dispose it. If possible, please post your code. It may be convenient to discuss this issue.
这篇关于关于.net交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!