NodeJS MSSQL Module Executing only Part of Stored Proc
<p>So I have a node server, and I have it kicking off a stored proc for one particular internal tool.  However, it seems it is dying part way through (seems to be once dynamic sql is used).</p>

<p>So it does a bunch of general sql commands, but seems to be dying when we hit:</p>

<pre><code>set @cmd = N'Some stuff'
print @cmd
exec(@cmd)
</code></pre>

<p>my js server code is:</p>

<pre><code>            var connection2 = new sql.Connection(config2, function(err){

            console.log("Connection 2 error - "+ err);

            var request2 = connection2.request();

            var spName = "nameOfSP";

            console.log("---calling sp----");

            request2.execute(spName,function(response){
                    console.log("SP response " + response);

                })
            });
</code></pre>

<p>I am getting this error:</p>

<pre><code>SP response RequestError: Timeout: Request failed to complete in 15000ms
</code></pre>

<p>However, I am getting confirmation that the steps up until that dynamic sql is getting process almost instantaneously.</p>

<p>I've tried adding:</p>

<p>connectionTimeout: 30000</p>

<p>to my config, but it didn't seem to effect anything, which is making me feel like I'm not implementing that correctly.  The documentation for this doesn't show much for this part.</p>

<p>Any help would be greatly appreciated.</p>

<p>Thanks!</p>