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
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”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.