about SQL Statement Security

Discussion in 'ASP.NET 2.0' started by derinweb, Dec 22, 2006.

  1. Hi
    i have a question about using sql statement security , i created a db search in asp.net 2.0 that search in my sql server database and the syntax is :



    strSQLQuery = "SELECT file_url + ' ' + title AS file_url, title " _


    & "FROM Advice " _


    & "WHERE title LIKE '%" & Replace(strSearch, "'", "''") & "%' " _


    & "ORDER BY title;"


    if i don't use:


    Rplace(strsearch," ' " " ' ' " )& "%'"_


    is it has affect tomy website security ,


    thanks for any help
     
  2. You might want to trim a few more characters if injection security is your concern.


    i.e. Braces and slashes, etc.


    All the best,


    Mark
     

Share This Page