Name Space error VS2015

rflorencio used Ask the Experts™

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

Open in new window

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

best regards
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technical Specialist
Awarded 2017
Distinguished Expert 2018
You need to add reference to file Microsoft.SqlServer.Management.SqlParser.dll
Download it from

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial