Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I had developed one application in c# with sql server database. It's a billing system.I had store customer details in customer table and his bill items should be stored in bill_item tables.
This application work finely but when power loss in bill generation, only the customer information is stored and bill_items are not stored. Can any one give suggestions how can i manage this problem


Thanks&advace
Posted
Comments
n.podbielski 3-Oct-12 5:41am    
"This application work finely but when power loss in bill generation"
A what?

That is what transactions are for.
Using Transactions in ADO.NET[^]

But if this is a critical system, you could need some fault tolerance and/or clustering.
 
Share this answer
 
Use a Transaction around the whole update - until you commit the transaction, no permanent update is done. If the power fails, the entire update should be lost, not just part of it.
SQL Transactions[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900