troubleshooting Question

Name Space error VS2015

Avatar of rfl
rflFlag for Portugal asked on
Visual Basic.NETC#.NET Programming
1 Comment1 Solution202 ViewsLast Modified:
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

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

best regards
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros