module.exports: is not a function
<p>Following is my sqlhelper.js</p>

<pre><code>var req = require("request");
var tp = require('tedious-promises');
var dbConfig = require('../config/connectionString.json');
var TYPES = require('tedious').TYPES;

function SQLHelper() {
}

SQLHelper.prototype.ExecuteDataset = function(query, params, callback, failure) {

    tp.setConnectionConfig(dbConfig);
    tp.sql(q);
    $(params).each(function(idx) {
        var p = params[idx];
        tp.parameter(p.name, p.value);
    });

    tp.execute()
        .then(function(results) {
            callback(results)
        }).fail(function(err) {
            failure(err);
        });
};

module.exports = SQLHelper;
</code></pre>

<p>I have used it like this</p>

<pre><code>var sqlHelper = require('../SQLHelper.js');
sqlHelper.ExecuteDataset(q, params, function(results) {//Here I get error
                console.log(results)
            },
            function(err) {
                console.log(err);
            });
</code></pre>

<p>I get following error <strong>TypeError: sqlHelper.ExecuteDataset is not a function</strong></p>

<p>I dont know whats wrong here.
Kindly help.</p>