471,627 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

verfiy a query like Query Analyzer's parse query function

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
Dec 23 '05 #1
1 2076
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"kevin" <ke***@discussions.microsoft.com> wrote in message
news:23**********************************@microsof t.com...
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

Dec 24 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Muzamil | last post: by
1 post views Thread by justinjoylife | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.