Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2005

Tip: Looking for answers? Try searching our database.

verfiy a query like Query Analyzer's parse query function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kevin - 23 Dec 2005 20:01 GMT
I thought that the parse query feature in Query Analyzer simply wrapped your
statement in a TRAN and then issued a ROLLBACK statement to prevent making
real changes... but i just had a query parse successfully (ctrl-F5) and then
fail on execution(F5), due to a lack of permissions on the object.

Parse must simply verify syntax... not a simple task when you think about it.

Has anyone every tried to simulate this?  My first thought would be a regex,
but my head hurts to even think about it.

Any suggestions or links?

kevin
Nicholas Paldino [.NET/C# MVP] - 24 Dec 2005 01:33 GMT
Kevin,

   There used to be a parser that shipped with SQL Server 2000 which would
parse apart the keywords for SQL queries (for Oracle syntax and for SQL
Server syntax).  However, there is little documentation to indicate just
*how* it is parsed.

   However, a general search for SQL parser on google turned up a number of
results, some of which I am sure can be converted or used in .NET.

   Hope this helps.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

>I thought that the parse query feature in Query Analyzer simply wrapped
>your
[quoted text clipped - 13 lines]
>
> kevin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.