帮助我完成Web应用程序数据库事务回滚最佳实践 [英] help me on Web application Database transaction roll back best practices

查看:99
本文介绍了帮助我完成Web应用程序数据库事务回滚最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为会计软件包开发一个Web应用程序。我只是想快速了解回滚交易的最佳方法。

我的编码结构是这样的



我在SQL 2012中使用ASP.net vb编码

客户端即时为所有表准备数据集。然后将该数据集传递给类文件。来自那里的数据集被分开到不同的表。这些表行列值传递到商店的程序。

一个接一个的表将要更新。

作为一个例子 - :有两个表要更新。 InvoiceHeader和InvoiceLineItems

InvoiceHeader将首先更新并调用anothere方法来更新发票行项目。



如果订单项无法更新以前的交易应该回来。(发票标题)



请给出解决方案。



谢谢

Ashok

ashokpathirana@outlook.com

I am developing a web application for accounting package. I just want to get a quick idea about best way to roll back the transaction.
My coding structure is like this

I do use the ASP.net vb coding with SQL 2012
Client side i m preparing a data set for all tables. Then pass that data set to the class file. by the from there data set getting separate to different tables.that tables row column values passing to the Stores procedure.
One after another tables going to update.
As a example -: There are two tables to update. InvoiceHeader & InvoiceLineItems
InvoiceHeader going to update first and call anothere methord to update Invoice line items.

If line items fail to update previous transaction should role back.(Invoice header)

Please give a solution onthis.

Thanks
Ashok
ashokpathirana@outlook.com

推荐答案





请参阅以下链接..



http://stackoverflow.com/questions/11953800/asp-net-c-rollback-or-commit-after-multiple-process [ ^ ]



在ADO中使用事务。净 [ ^ ]



http://forums.asp.net/t/1166177.aspx?Transaction+commit+and+rollback+in+c+How+ [ ^ ]



谢谢

Magesh M
Hi ,

Refer the Following links..

http://stackoverflow.com/questions/11953800/asp-net-c-rollback-or-commit-after-multiple-process[^]

Using Transactions in ADO.NET[^]

http://forums.asp.net/t/1166177.aspx?Transaction+commit+and+rollback+in+c+How+[^]

Thanks
Magesh M


这篇关于帮助我完成Web应用程序数据库事务回滚最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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