keyongtech


  keyongtech > dotnet.languages.* > dotnet.languages.csharp > 12/2005

 #1  
12-23-05, 08:01 PM
kevin
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
 #2  
12-24-05, 01:33 AM
Nicholas Paldino [.NET/C# MVP]
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.
Similar Threads
Access 2000 Query very slow compared to SQL Query Analyzer

I have the following Access 2000 query that runs so slow I can't even wait until finishes. (over 5 minutes so far). When I run the code in SQL Query Analyzer it doesn't...

Trying to query the Address table data of AdventureWorks database from Query Analyzer - need help!

Hi there, I have installed Sql server 2005 developer on my machine which already has a Sql server 2000 installed on. Now i am trying to query the Sqlserver 2005 data(Ex: from...

ADO.NET Query Execution time is 10 times slower than via Query Analyzer

Hi, I have the stored procedure which uses temporary tables and does some calculations. It executes in 3 sec when I use Query Analyzer. When I execute it using ADO.NET...

System Stored Proc to Parse/Validate Sql statement like Query Analyzer does

I know someone posted this in the ADO.NET group a few months ago but I sure can't find it. Does anyone know what this is? It's the proc that QA runs whenever hit the check...

BCP query out executed by xp_cmdshell works fine from query analyzer but fails from VB Component

Hi all, I have a stored procedure which returns a vast number of record and i have to write the output into a csv file. I'm using BCP utility to do this and BCP utility is...


All times are GMT. The time now is 12:25 AM. | Privacy Policy