Avoid SQL Injection with Parameters

Posted by simonsabin on SQL Blogcasts See other posts from SQL Blogcasts or by simonsabin
Published on Mon, 05 Apr 2010 20:07:10 GMT Indexed on 2010/04/05 20:23 UTC
Read the original article Hit count: 294

The best way to avoid SQL Injection is with parameters. With parameters you can’t get SQL Injection. You only get SQL Injection where you are building a SQL statement by concatenating your parameter values in with your SQL statement. Annoyingly many TSQL statements don’t take parameters, CREATE DATABASE for instance, or really annoyingly ALTER USER. In these situations you have to rely on using QUOTENAME or REPLACE to avoid SQL Injection. (Kimberly Tripp takes about this in her recent blog post Little...(read more)

© SQL Blogcasts or respective owner

Related posts about tsql

Related posts about Tips and Tricks