title: DB2 SQL connection in Protractor - How To
body: <p>I am new to Protractor and still learning.  In my conf.js file I have (maybe incorrectly?) set up a connection to a database:</p>
  
  <pre><code>mysql = require('C:/.../AppData/Roaming/npm/node_modules/mysql');
  var connection = mysql.createConnection({
      host : 'localhost',
      user : 'username',
      password : 'password',
      database : '//xxxxxxx.xxx.xx:nnnnn/xxxxxxxx'
    });
  connection.connect();
  </code></pre>
  
  <p>Then in my test I attempt to query for data to use:</p>
  
  <pre><code>//SQL to get Random Invoice Ref
  var invRef = SELECT foo FROM table.table 
  WHERE condition = myData
  ORDER BY RAND()
  FETCH FIRST ROW ONLY;
  </code></pre>
  
  <p>But, it's giving me this error:</p>
  
  <pre><code>invRef = SELECT foo FROM table.table ('foo' is underlined with the '^' character)
  Exception loading: C:\...\testSpec.js
  Error -- fail
  </code></pre>
  
  <p>I suspect I have things set up incorrectly, to say the least.  Can someone tell me the proper way to define a db2 SQL connection in Protractor?  Am I also using it correctly in my test?</p>