rp
asked on
Name Space error VS2015
Hi,
I' am trying use the following code to validate a sql query:
I use Vs 2015, but not recognizes Microsoft.SqlServer.SqlPar ser.SqlCod eDom.SqlSc ript name space.
best regards
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.SqlPar
best regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.