• michael_c_leone (8/31/2012)


    Thanks! It looks like SqlCodeGuard is just want I was looking for. Not sure how extensible it is, or if it will be easy to get the results into a database where we can report and track, but it is a great start.

    from version 2.1.4628 SqlCodeGuard has an API to incorporate it in your own projects

    usage is pretty simple

    SqlCodeGuardAPI.API api = new SqlCodeGuardAPI.API();

    api.IncludeIssue("ALL");

    bool unparsed;

    List<Issue> l = api.GetIssues(sql, out unparsed);

    if (unparsed)

    {

    Console.WriteLine("Unparsed! Issue list may be incomplete or wrong");

    }

    Console.WriteLine("Issues:");

    foreach (Issue i in l)

    {

    Console.WriteLine(String.Format("({0}){1} at {2}:{3} ({4})", i.ErrorCode, i.ErrorText, i.Column, i.Line, i.ErrorMessage));

    }