如何防止突然断电导致.net应用程序中的数据丢失? [英] How to prevent data loss in a .net application due to sudden power failure?
问题描述
我们正在开发RetailPOS .net(windows)应用程序.
We are developing an RetailPOS .net (windows) application.
一位客户问:如果突然断电,应用程序中正在处理的当前数据将如何处理?",应用程序是否能够恢复未保存的数据?"
One of the customer asks 'What will happen to current data being processed in the application when a power went off suddenly?', 'Will the application able to recover the unsaved data?'
我想知道如何在.net应用程序中包含此功能?
I am wondering, how this feature can be included in the .net application?
有什么可以帮助我的,为此需要做些什么?
Can some help me, what needs to be done for this?
推荐答案
首先,研究一下UPS(不可间断电源)
First, look into a UPS (un-interuptable power supply)
第二,研究创建持久性事务,这些事务将尽早且经常保存,但是直到您告知时才提交.这超出了TSQL中的典型事务.
Second, look into creating persistent transactions, transactions that will save early and often, but not commit until you tell it to. This goes a little beyond the typical transactions in TSQL.
这篇关于如何防止突然断电导致.net应用程序中的数据丢失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!