February 28, 2012 at 11:54 am
Hello.
Is there any chance that anybody knows how to utilize the SQL [Parse] button functionality for checking SQL validity from within a VB.NET application?
Reason: I have been tasked with providing a few specific users that do not have SSMS, the ability to write adhoc select queries from within a custom VB.NET application. I would like to be able to call the SQL [Parse] button functionality to validate the adhoc SQL the users are trying to execute prior to them getting an error message.
Thanks in advance for any help provided.
February 28, 2012 at 12:13 pm
Take a look at profiler.
SET PARSEONLY ON
GO
--your t-sql here
GO
SET PARSEONLY OFF
GO
Never tried that in an app to see what happens...I would be interested to see what happens.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply