Click here to Skip to main content
15,033,147 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I wish to know the best way to protect ones database from sql injection.
Posted

Always use parameterized queries!

See
* Using SQLParameters with VB.NET/C#[^]
* Configuring Parameters and Parameter Data Types[^]
* What is SQL injection?[^]

This protects from SQL injection attacks.
An added benefit is better performance for your queries.
   
Comments
Sergey Alexandrovich Kryukov 24-Nov-13 14:51pm
   
5ed.
—SA
Maciej Los 3-Dec-13 16:15pm
   
+5!
   

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