本文介绍了在SQL Server中安全更改数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的先生, 我在VB中有一个程序可以清空并更改表,如下所示:
dear sirs, I have a procedure in VB that empty and changes a table as this :
. sqlcmd="delete from mytable" ''excute sql... . while ... . . sqlcmd="insert into mytable ..." ''excute sql... . end while .问)我检查安全性;如果在循环过程中发生了错误(错误,局域网连接失败,硬件中断),则我的表不可用.我应该使用什么套头衫? 谢谢,
Q) i check for safety; if during loop a prablem happend (error,lan connecttion fail ,hardware braekdown) my table is not useable. What sloution should i use ? Thanks,
推荐答案您应该在这里使用交易.如果您使用事务处理,则在这种情况下将为您提供帮助.请在这里阅读, www.sql-server-performance/articles/asp_ado/ado_transactions_p1.aspx www.codeproject/KB/database/transactions.aspx Hi, You should use Transaction here. If you use Transaction help you in this scenario. Please read here, www.sql-server-performance/articles/asp_ado/ado_transactions_p1.aspx www.codeproject/KB/database/transactions.aspx
更多推荐
在SQL Server中安全更改数据
发布评论