Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As you don't provide much detail on HOW the code works I'm going to do some wild guessing that with 'parameterized query' you mean a stored procedure and that you call the stored procedure by means of it's entire text (not a best practice, but I don't know what the restrictions are of the software you're using).</p> <p>Anyway, the reason <code>pad</code> or <code>proc</code> might cause problems is because you don't explicitly tell the server that these are strings. For reasons I've never truly understood, TSQL will allow you to pass single-word strings to (n)varchar parameters of procedures. A simple example would be :</p> <pre><code>EXEC sp_helpdb master </code></pre> <p>Strictly speaking this should give a syntax error. The correct syntax is :</p> <pre><code>EXEC sp_helpdb 'master' </code></pre> <p>But it seems the devs went with 'Hey it's less typing, that's great for productivity!' and so the query works.</p> <p>Now if your procedure is called like this :</p> <pre><code>EXEC p_find_recipe thai </code></pre> <p>This will pass the string 'thai' and everything will run as expected. However, when using a reserved word like <code>proc</code> or <code>file</code> or <code>table</code> etc... that would cause a syntax error and you'd need to make sure to put quotes around the value for it to work.</p> <p>All that said : - the syntax error should be returned right away, it shouldn't take 10 seconds - AFAIK 'pad' is not a reseverd keyword</p> <p>So I'm not sure supra applies to your problem and so it's quite possible I just spent 10 minutes typing for nothing =) </p> <p>Anyway, you'll probably need to give some extra input on what language you're using, what you mean with parametrized query (maybe you mean the <code>SELECT * FROM table WHERE field = ?</code> syntax where the ?'s are filled in afterwards ?), preferably with some example code.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload