You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Previously, the SQL server module executed arbitrary TSQL by
injecting user supplied data into a template verbatim. Unfortunately
this mechanism does nothing to address syntax errors, which will
prevent the try / catch mechanism employed from working and
propagating errors.
The stored procedure sp_executesql can be used to execute arbitrary
SQL strings, and will properly propagate an exception that can be
caught, so use that method.
Of note, since the user query is being placed into a string, it must
have single quotes escaped properly. An additional test has been
added to verify that single quotes are escaped as expected.
0 commit comments