By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

verfiy a query like Query Analyzer's parse query function

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.