I am not asking to test the SQL Statement by parsing it.
I mean something similiar to execute the SQL Statement with ADO.NET, so it will actually run in SQL Server to see if the fields name correct, table names correct, stynxs correct, data type corrects etc.
The previous developer done this by executes the SQL Statement with ADO.NET and check if is throw execption. But the data return is a large data set, which is wasting the resources. So is there anyway I can ask SQL Server to perform a statement check for me in C#?
Try SET PARSEONLY ON. http://msdn.microsoft.com/en-us/library/ms178629.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With