title: Node.js DB2 query with parameters
body: <p>I am using node.js to connect to a DB2 database and loading different queries. But I would like to use parameters from user input.
  My connection string is:</p>
  
  <pre><code>var ibmdb = require("ibm_db")
      , cn = "DATABASE=namedb;HOSTNAME=hst;UID=portal;PWD=portalpwd;PORT=50000;PROTOCOL=TCPIP;"
      ;
  </code></pre>
  
  <p>But my query is static, I need to pass parameters/variables from user input.</p>
  
  <p>I am using user input with <code>var rl = require('readline');</code> but the problem now is how to communicate variables to this query and put <strong>dynamic parameters</strong> not a single value like <code>name</code>, <code>id</code> etc.</p>
  
  <pre><code> var rows = conn.querySync(
     "select name,id,uid,password,type from db21.rep_name fetch first 10 rows only"
   );
  </code></pre>