在SQL Server中安全更改数据

编程入门 行业动态 更新时间:2024-10-23 09:29:59
本文介绍了在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中安全更改数据

本文发布于:2023-10-16 00:27:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1495934.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据   SQL   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!