SQL Programming
Calling the sql Parse
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
--- 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.
Rick Strahl
West Wind Technologies
Making waves on the Web
from Maui
West Wind Technologies
Making waves on the Web
from Maui
Kevin,
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.
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.
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.
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
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
Doug,
Kevin,
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.
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