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

SQL Procedure OUTPUT Param? #28

Open
dlbrown06 opened this issue Sep 9, 2015 · 5 comments
Open

SQL Procedure OUTPUT Param? #28

dlbrown06 opened this issue Sep 9, 2015 · 5 comments

Comments

@dlbrown06
Copy link

There doesn't appear to be any clear documentation on how (or if) this is possible to view output params when a procedure is called.

Is this possible?

@khkiley
Copy link

khkiley commented Sep 22, 2015

+1

@ScheerMT
Copy link

ScheerMT commented Oct 6, 2015

I wasn't able to get this to work myself. The upstream library, mssql appears to correctly support output parameters on stored procedures..looks like a PR may be in need :)

For now, if you can, return select statements from your stored procedures to get the results out of them as a work around. I know its less than ideal but it will have to do

@dlbrown06
Copy link
Author

I would have done that if I was starting from scratch. Unfortunately I was integrating with an existing database with many many procedures that other code bases were already touching.

@agagne122
Copy link

Has anyone as of yet been able to get Seriate to work with output parameters in SQL Server Stored Procedures? I am storing the two output parameters for the stored procedures in two variables defined in the following code:

var sql = require( "seriate" );

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

// Create endpoint /api/users for GET
exports.getDataSql = function(req, res) {
var results = {};
var Filename;
var Filename2;
sql.execute( connection, {
procedure: "GetData",
params: {
Name: {
type: sql.NVARCHAR(200),
val: req.body.DBName
},
SQLFilename: {
type: sql.NVARCHAR(1000),
val: Filename
},
BackupFilename: {
type: sql.NVARCHAR(1000),
val: Filename2
}
}

Are there any other steps I need to perform to get this to work?

Thanks!

@lbarbato
Copy link

+1

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

5 participants