Skip to content

Sql injection all tables, How to Prevent?

krishan kumar  singh

krishan kumar singh

Asked Jul 31, 2014, 1:10 AM EDT1 answer
Share
LinkedInX
Dear Sir,

Sql injection happen in our website and i used store procedure. but happen this problem and that inject all database table of varchar and nvarchar columns.

</title>
States have been around http://paydayloansforsure.com >24 hour payday loan even thousands of people.


Please help and suggest me what i do?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I use PetaPoco ORM for SQL and stored procs, and it takes care of SQL injection, e.g.,
    Code
    var id=123;
    var a=db.Query<article>(PetaPoco.Sql.Builder
        .Append("SELECT * FROM articles")
        .Append("WHERE article_id=@0", id)
        .Append("AND date_created<@0", DateTime.UtcNow)
    )
    http://www.toptensoftware.com/petapoco/

    here i'm passing say ID as parameter and not like
    "="+id
    0