Link to home
Start Free TrialLog in
Avatar of rp
rpFlag for Portugal

asked on

Name Space error VS2015

Hi,

I' am trying use the following code to validate a sql query:

       Dim sql As String
        Dim script As Microsoft.SqlServer.SqlParser.SqlCodeDom.SqlScript
        sql = " SELECT * FROM FROM sys.objects"
        'a shared public function, no need to construct an object, so no object.parse method is used.
        script = Microsoft.SqlServer.SqlParser.Parser.Parser.Parse(sql)
        For Each s As Microsoft.SqlServer.SqlParser.Parser.Error In script.Errors
            Debug.Print(s.Message)
        Next

Open in new window


I use Vs 2015, but not recognizes Microsoft.SqlServer.SqlParser.SqlCodeDom.SqlScript name space.

best regards
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial