5 pts.
 SQL Injection Validation
HOW CAN I USE VALIDATION CODES IN ORDER TO AVOID SQL INJECTION IN MY WEB SERVER? I MEAN, EVERYBODY KNOW THAT HTML MODIFICATION IS VERY EASY, SO, DO I HAVE TO USE WEB SERVICES TO DO THIS OR GET ANOTHER APP?

Software/Hardware used:
ASKED: July 9, 2009  4:01 PM
UPDATED: July 29, 2009  6:48 PM

Answer Wiki:
At the very basic level check the values that the user submits before you send them to the SQL Server and remove any single quotes and semi-colons. You may want to look at this <a href="http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1318837,00.html">article </a>as well. SQL injection is usually an issue when dynamic sql is being used in the Stored Procedures. ou can parameterize the queries and use the MSSQL procedure sp_executesql to run the query. This will protect against any SQL injection. If you are creating your statement on the fly (i.e. set @vs_sql = 'Select something from table where field = ' + @field) then you will have issues. This isn't the recommended way of writing the query.
Last Wiki Answer Submitted:  July 29, 2009  6:48 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _