SQL Programming
Calling the sql Parse
Gravatar is a globally recognized avatar based on your email address. Calling the sql Parse
  n/a
  All
  Apr 22, 2014 @ 01:09pm
Can you call the sql parser that is is in sql management studio via the oSQL.execute() type approach? It would be nice to ask SQL if the syntax is correct before actually executing a sql query.

--- Kevin
Gravatar is a globally recognized avatar based on your email address. Re: Calling the sql Parse
  Rick Strahl
  Kevin Emmrich
  Apr 23, 2014 @ 04:56pm

Not sure, but I'd think that'd probably be too slow. Isn't easier just to execute the SQL and capture the failures?

+++ Rick ---



Can you call the sql parser that is is in sql management studio via the oSQL.execute() type approach? It would be nice to ask SQL if the syntax is correct before actually executing a sql query.



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Calling the sql Parse
  n/a
  Kevin Emmrich
  Apr 23, 2014 @ 08:27pm
Kevin,

The TRY_PARSE command has been added to SQL Server 2012. Perhaps, if you're using that version it would help?

http://technet.microsoft.com/en-us/library/hh213126.aspx

Regards,

Doug


Can you call the sql parser that is is in sql management studio via the oSQL.execute() type approach? It would be nice to ask SQL if the syntax is correct before actually executing a sql query.

Gravatar is a globally recognized avatar based on your email address. Re: Calling the sql Parse
  n/a
  Rick Strahl
  Apr 24, 2014 @ 02:57am
You are probably right here, I am just going through some heavy duty security scanning and was looking at some ways to avoid errors when undergoing sql injection attacks. I got over 9,000 emails from a company doing the scan (which means the app caught the injections)! But this issue is the same -- how to recover a failed sql command.

Kevin

Not sure, but I'd think that'd probably be too slow. Isn't easier just to execute the SQL and capture the failures?

+++ Rick ---



Can you call the sql parser that is is in sql management studio via the oSQL.execute() type approach? It would be nice to ask SQL if the syntax is correct before actually executing a sql query.




--- Kevin

Gravatar is a globally recognized avatar based on your email address. Re: Calling the sql Parse
  n/a
  Doug Dodge
  Apr 24, 2014 @ 02:58am
Doug,

Thanks, that might be useful in one my user defined sql query routine.

Kevin
--------------------------------------------------------------


Kevin,

The TRY_PARSE command has been added to SQL Server 2012. Perhaps, if you're using that version it would help?

http://technet.microsoft.com/en-us/library/hh213126.aspx

Regards,

Doug


Can you call the sql parser that is is in sql management studio via the oSQL.execute() type approach? It would be nice to ask SQL if the syntax is correct before actually executing a sql query.



--- Kevin

© 1996-2024