Questions tagged [output-parameter]

output parameters allow stored procedures to return data to the calling code.

133 questions
0
votes
1 answer

Output parameter in SQL not returning any value

I am trying to return a value from a stored procedure in .net, but it does not return any value. Here is my stored procedure... ALTER procedure [dbo].[usp_CreateUser] @UserName varchar(50), @Result bit output as begin declare @temp…
Tanuj Wadhwa
  • 2,025
  • 9
  • 35
  • 57
0
votes
1 answer

Assigning ID to variable with parameter OUTPUT

This INSERT query works perfectly fine inside of VS20012, SQL Server 2008 R2. But when I try to execute it from VB code behind I get DBnull Conversion error on the line trying to assign the value to the variable after the execute. The insert is not…
htm11h
  • 1,739
  • 8
  • 47
  • 104
0
votes
1 answer

Wrapping allocated output parameters with a scoped_ptr/array

So, I have some code which looks like this: byte* ar; foo(ar) // Allocates a new[] byte array for ar ... delete[] ar; To make this safer, I used a scoped_array: byte* arRaw; scoped_array ar; foo(arRaw); ar.reset(arRaw); ... // No…
Danra
  • 9,546
  • 5
  • 59
  • 117
0
votes
0 answers

No value was supplied, to Output Parameter

I am getting error as "Procedure or function 'Artical_i' expects parameter '@ID', which was not supplied.". But my @ID parameter is Output parameter. -------------------------------c# Code---------------------------------------- int…
AK47
  • 3,707
  • 3
  • 17
  • 36
0
votes
2 answers

Entity framework and stored procedure with output parameter returning row (EF will receive complex type)

I am using entity framework 6 with stored procedures. Currently I deal with this problem: Ideally I need to get data from one stored procedure. This data includes: One Conversation (basic info) + multiple Clients (which are engaged in this…
0
votes
1 answer

Set Output Parameter to equal result of Select statement

I work with a MS-Access 2010 frontend, where I called the stored procedures and MS- SQl server 2008 backend, where I apply the scripts for the stored procedures. I created a stored procedure that retrieves the TestID where the input parameters match…
VictoriaJay
  • 381
  • 3
  • 8
  • 22
0
votes
1 answer

How to pass a dataset as a output parameter between stored procedures t-sql

I created a stored procedure that has input the DBName and output param. a flag that indicates if the descriptions of tables and columns were downloaded into a temp table with success. I try to pass the temp table as output param and use it in…
0
votes
1 answer

Returning SQL Server Output parameter to C# by Stored Procedure

I have a stored procedure in SQL Server 2012 with an OUTPUT parameter. When I call the c# decrypt function, at the point when I hit ExecuteNonQuery(), I always get the error: Procedure or function 'DecryptCCode' expects parameter '@decryptedStr',…
0
votes
2 answers

Procedure or function has too many arguments specified when executing

I have the following stored procedure that does produce the error specified under Management Studio 2008. But produces output under Management Studio 2012? Any ideas? ALTER PROCEDURE SPU_IsoEmailUpdate @isoNumber char(10), @newEmailAddress…
eugene.it
  • 417
  • 3
  • 13
  • 32
0
votes
2 answers

SQL Server stored procedure - Output Parameters

I have a stored procedure with 25 output parameters. Should all these parameters be supplied / declared or is there a way to selectively declare just a few?
0
votes
2 answers

Retrieving output from stored procedure in c#

I am calling a stored procedure written at sql server, in my c# service. But I am again and again facing exception: InvalidCastException was unhandled by user code: Specified cast is not valid Code: public function(Data dt) { con = new…
Nikunj Vats
  • 33
  • 1
  • 6
0
votes
2 answers

Return a result set as output param in a sybase stored proc

I have a stored procedure, in which I want to simply store result of a select statement in an output parameter and return that , how can i do that. I would appreciate if you give me the right syntax of it, since i am new to DB and Sybase specially,…
user620339
  • 851
  • 3
  • 20
  • 42
0
votes
2 answers

sqlserver output parameter empty

Why does the output parameter return a blank value from identity column after insert? I have tried various tests and the return output parameter is always empty Here is the C# code: using System.Data.SqlClient; SqlConnection conn = new…
0
votes
1 answer

WCF Service - return the output parameter from a stored procedure in Entity Model

I have a stored procedure for authentication, taking login and password and returning a string . I would like to call the stored procedure(sql server 2005) from my WCF data service ( using entity model and function imports ) and return the output…
SMR
  • 3
  • 4
0
votes
4 answers

How to pass parameters for output in C++

Some of methods that I see in C++ code are of this structure: void Class::method1(int &a); and are called like this: int a; class->method1(a); But sometimes I see structures like: void Class2::method2(int* a); And these methods are called like…
Monday to Friday
  • 239
  • 5
  • 16
1 2 3
8
9