使用asp.net将数据插入sql的最佳方法?帮助我 [英] Best way to insert data into sql with asp.net ?help me
本文介绍了使用asp.net将数据插入sql的最佳方法?帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要知道使用Asp.net插入,更新,删除sql的最佳方法,而不会注入sql并且是否有大量数据?
帮助我
I need to know the best way to insert,update,delete into sql using Asp.net without happening injection into sql and if there is a lot of data ?
help me
推荐答案
通过 -
SQL注入攻击以及如何防范它们的一些提示 [ ^ ]
SQL注入攻击 [ ^ ]
Go through -
SQL Injection Attacks and Some Tips on How to Prevent Them[^]
SQL injection attacks[^]
在SQL中使用存储过程。如果您使用CommandText
,始终使用参数并且不要连接文本框或字符串值。
最适合您的链接:
http://searchsqlserver.techtarget.com/tip/Examples-of-SQL-Server-stored-procedures-and-parameters [ ^ ]
http://msdn.microsoft.com/en-us/library /ms345415.aspx [ ^ ]
祝你好运,
Eduard
Use stored procedure in SQL. In case you are usingCommandText
, always use parameters and do not concat textboxes or string values.
Best links for you:
http://searchsqlserver.techtarget.com/tip/Examples-of-SQL-Server-stored-procedures-and-parameters[^]
http://msdn.microsoft.com/en-us/library/ms345415.aspx[^]
Best regards,
Eduard
我使用的方法是参数。有关CodeProject的教程,请访问使用带有VB.NET / C#的SQLParameters [ ^ ]。
The method I use is Parameters. There's a tutorial on CodeProject at Using SQLParameters with VB.NET/C#[^].
这篇关于使用asp.net将数据插入sql的最佳方法?帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文