Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seriate RequestError: SqlContext Error. Failed on step “GetData” with: "Timeout: Request failed to complete in 15000ms #51

Open
Anahid opened this issue May 3, 2016 · 0 comments

Comments

@Anahid
Copy link

Anahid commented May 3, 2016

Hi,

I am trying to run a stored procedure on my SQL database from the node server using seriate. however i get the following error and i am not sure why. I'd really appreciate your help on it.

Error: { [RequestError: SqlContext Error. Failed on step "GetData" with: "Timeout: Request failed to complete i 15000ms"] name: 'RequestError', message: 'SqlContext Error. Failed on step "GetData" with: "Timeout Request failed to complete in 15000ms"', code: 'ETIMEOUT', number: 'ETIMEOUT', lineNumber: undefined, state: undefined, class: undefined, serverName: undefined, procName: undefined, precedingErrors: [], step: 'GetData' }

This is my code:

var sql = require( "seriate" );

var connection = {
    name: "example-1",
    user: "user",
    password: "pass",
    host: "host_ip",
    database: "Test"
};    

exports.getDataSql = function(req, res) {
    var results = {};

    sql.execute( connection, {
       procedure: "GetData",
       params: {
            Name: {
                type: sql.NVARCHAR(50),
                val: "user2"
            },
            LName: {
               type: sql.NVARCHAR(50),
               val: "user1"
           },
           finalName: {
                type: sql.NVARCHAR(50),
                val: "user3"
            }
        }
    }).then( function( results ) {
        console.log("getting data: ");
        res.json(results[0][0]);

    }, function( err ) {
        console.log( "Error", err );
        res.status(500).send({ error: 'Something failed!' });
    } );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant