output parameters allow stored procedures to return data to the calling code.
Questions tagged [output-parameter]
133 questions
0
votes
1 answer
MSTSQL: Can a SP return both an out param and a result set
I wish to know whether it's feasible to have a TSQL stored procedure return both a result set and the output parameter like so.
create procedure uspReadMyXmlInformation(@myXmlDoc xml, @myProductNum varchar(18) output) as
begin
set…

Will Marcouiller
- 23,773
- 22
- 96
- 162
0
votes
1 answer
How to return output paramter in mysql store procedure
I want to return a output parameter from a store procedure.
I have written below query,but the output param is giving blank value
CREATE DEFINER=`root`@`%` PROCEDURE `GetVendorSpecificReport`(
startdate DATE,
enddate DATE,
vendorname …

sandeep.mishra
- 825
- 4
- 19
- 40
0
votes
1 answer
Record set or output parameters in a stored procedure in SQL Server?
I'm working in a project for my university about security based on the design of a relational database, using SQL Server, and I'm currently working in stored procedures specifically.
After doing some research about them I have found that there is…

Antonio
- 23
- 7
0
votes
2 answers
Get rid of output parameters when returning a container
When returning a container, I always had to determine if I should use return value or use output parameter. If the performance matter, I chose the second option, otherwise I always chose the first option because it is more intuitive.
Frankly, I…

Junekey Jeon
- 1,496
- 1
- 11
- 18
0
votes
1 answer
What should be the DbType in case of oracle raw output parameter
I'm using C# .net 4.5.2 and working with oracle DB.
I'm calling a function that have RAW output parameter (pPF):
FUNCTION GET_ACCESS_CONTEXT(pTId IN NUMBER,
pUId IN RAW,
pOId IN…

Amir M
- 508
- 1
- 8
- 28
0
votes
2 answers
C# & SQL Server stored procedures - can't get output parameter value, return value works
I would like to get a value of an output parameter of a stored procedure, but I'm getting +1 all the time. When obtaining a value by return everything's ok.
I managed to obtain a value of the output parameter using Entity Framework, however, it…

Łukasz Sypniewski
- 602
- 1
- 10
- 19
0
votes
2 answers
how to call stored procedure in EF6 with output parameters
i have a stored procedure which returns a parameter containing string in it i don't know how to call it and get the output parameter to show on my view
ALTER PROCEDURE [dbo].[sp_test]
@room_type varchar(40)
,@room_price_min float
,@room_price_max …

Malav Sevak
- 25
- 1
- 4
0
votes
2 answers
MySQL- Stored Procs- Weirdness when trying to use an output parameter
To be honest, I'm feeling pretty stupid right now. But this simply isn't working.
Scenario
I have a stored procedure that includes an output parameter. I'm trying to SELECT a value INTO that parameter. This seems simple, but it continues giving…

JMTyler
- 1,604
- 2
- 21
- 24
0
votes
1 answer
Get raised exception from stored procedure as output variable
I am having problem in storing the exception raised from a stored procedure.
For example I am having two stored procedures P_Add And P_GetAdd.
P_Add returns an exception on divide by zero as shown,
procedure P_GetAdd executes P_Add.
I want to return…

Aman Chauhan
- 95
- 1
- 3
- 12
0
votes
1 answer
Having trouble with OUTPUT paramaters in SP with sqlsrv (PHP)
Sorry for my poor english. Here's the problem: i'm trying to reciebe an ID in PHP from a table in sql server express 2014 via sqlsrv driver, an SP and a output parameter.
When i execute de SP and print the output parameter via SSMS everything works…

Nicolas Paz
- 3
- 4
0
votes
1 answer
C# ODB.NET Out parameter is always DBNull
I have a stored procedure within a package in Oracle SQL Server.
This procedure has input and output parameters. The procedure itself works and when executed in Oracle SQL Developer the output parameter reads the expected output (column value of…

Devvox93
- 166
- 1
- 3
- 14
0
votes
1 answer
how to define and retrieve Oracle output parameter table of UDT(object) in C#
I am trying to figure out how to define and retrieve an Oracle OUTPUT parameter which is a table of UDT(object) in C#.
Specifically I am using C#, .NET 4.0 and Oracle.ManagedDataAccess
I cannot seem to find the right example for this specific…

bbaley
- 199
- 6
- 22
0
votes
0 answers
How to execute dynamic stored procedure in sql server with boolean return value?
I have a stored procedure that has boolean result parameter as output. But my project needs to use 3 databases. Basically, there is a main database and 2 others. The other databases using same stored procedure but they just depend on params. If I…

Abdullah Ilgaz
- 719
- 1
- 17
- 39
0
votes
2 answers
NHibernate to access Oracle stored procedure REFCURSOR and output parameter
Does the current version of NHibernate (v2.1.2) support access Oracle stored procedure output REFCURSOR in addition to an output parameter?
I can access the output refcursor fine with my code. However i'm not sure i can access the additional output…

Niner
- 2,074
- 6
- 37
- 47
0
votes
2 answers
Why is SQL rowcount not returning in my stored procedure output parameter?
I have a stored procedure with pseudocode like this:
ALTER PROCEDURE myProcedure(@param1 int, @param2 int, @returnCode int output)
AS
BEGIN
SELECT .... -- my query here
SET @returnCode = @@ROWCOUNT
END
However, when I execute this stored…

froadie
- 79,995
- 75
- 166
- 235