Click here to Skip to main content
15,616,520 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.

Always use parameterized queries!

* 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.
Share this answer
Sergey Alexandrovich Kryukov 24-Nov-13 14:51pm    
Maciej Los 3-Dec-13 16:15pm    
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