title: Why would using string.Format() break my sql?
body: <p>This works:</p>
  
  <pre><code>dynSQL = "SELECT * FROM inventory WHERE vendor_item = '" + VendorItem + "' ";
  </code></pre>
  
  <p>...but this doesn't:</p>
  
  <pre><code>dynSQL = string.Format("SELECT * FROM inventory WHERE vendor_item = {0}", VendorItem);
  </code></pre>
  
  <p>The latter causes "Cannot find table 0"</p>
  
  <p>This is another example of an attempt to pretty up the code knocking me right out of the saddle and onto the hardpan.</p>
  
  <p>Is encasing the where clause arg in double quotes bookmarked by outer single quotes really the way to go? There has to be a better way (better than my "better way" (which is great except for the fact that it doesn't work)).</p>