Questions tagged [output-parameter]

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

133 questions
4
votes
1 answer

PetaPoco and output parameters from stored procedures?

I'm trying to setup an output parameter using PetaPoco. I found someone using this sample online: var ctx = new CustomDBDatabase(); var total = new SqlParameter("Total", System.Data.SqlDbType.Int); total.Direction =…
Brian Mains
  • 50,520
  • 35
  • 148
  • 257
4
votes
2 answers

How to select stored procedure output parameters as a table in oracle sql developer

I have a procedure create or replace PROCEDURE proc ( p1 IN varchar2, p2 IN varchar2, p3 OUT varchar2 ) AS BEGIN p3:= p1 || ' ' || p2 END proc I call it by Declare P3 varchar(50); Begin proc('foo', 'bar', P3) END; I can print out the…
4
votes
1 answer

sqlalchemy Stored Procedure with Output

I want to call a stored procedure and receive the output parameter in python. I am using sqlAlchemy and can use parameters but do not know how to have the output be read into a variable. I understand that there is a outParam() attribute in…
4
votes
2 answers

Asynchronously invoking a method with an output parameter

Is it possible to use a TPL Task to asynchronously invoke a thread-safe method with the following signature and retrieve the boolean return value and the output parameter? public bool TryGet(T1 criteria, out T2…
0b101010
  • 756
  • 6
  • 15
4
votes
5 answers

List as output parameter in Java

I am trying to write a Java function which has List object as output parameter. boolean myFunction(int x, in y, List myList) { ...Do things... myList=anotherList.subList(fromIndex, toIndex); return true } Before that I call the function…
Rami
  • 8,044
  • 18
  • 66
  • 108
3
votes
1 answer

Output parameter value wrong

I am passing a value to a parameter in a Stored Procedure and also declaring it's direction as ParameterDirection.InputOutput. In the Stored Procedure, the parameter is also declared as an OUTPUT parameter and the value being returned from the…
Leah
  • 2,547
  • 5
  • 23
  • 28
3
votes
1 answer

Dapper with SQL Server output bigint parameter returns int32

I have the following C# code and a SQL Server stored procedure. private static long GetTestBigintOutput(SqlConnection dbConn) { var sqlParams = new DynamicParameters(); sqlParams.Add("@input_param", 1); sqlParams.Add("@output_param",…
3
votes
2 answers

Laravel Model SQL Server: Get Output Parameters from Stored Procedure

I want to get the output parameter from my SQL Server stored procedure in the Model of my Laravel, The Stored Procedure is working perfectly in the SQL Server Management tool and also in NORMAL php file but it does not work in LARAVEL MODEL. This is…
user8268874
3
votes
2 answers

This MATLAB function returns a vector of results

If I have a function in MATLAB, and within it I have a loop, that calculates two variables, something like: for index = 1:1000, var1 = 0.0; var2 = zeros(size(someMatrix)); ... %some calculus... ... end How do I define the…
edgarmtze
  • 24,683
  • 80
  • 235
  • 386
3
votes
1 answer

capture output parameter from stored proc in LINQ To SQL ExecuteQuery

Is it possible to get an output parameter back from the LINQ To SQL DataContext when you execute a stored procedure? IEnumerable
result = ExecuteQuery
(((MethodInfo)(MethodInfo.GetCurrentMethod())), address, pageIndex,…
BBurke
  • 331
  • 1
  • 6
  • 18
3
votes
2 answers

Using output parameter from SQL Server stored procedure in Access

I am attempting to get an output variable (the new identity column) from a stored procedure in SQL Server 2008 after executing the procedure from Access 2013 VBA. I don't fully understand all the adodb stuff, and I've tried a number of things from…
3
votes
2 answers

Why can't I use output parameters with covariant generic types?

I tried the following, and the result is in the interface names: interface NotOK { bool TryDequeue(out T t); } interface OK { T TryDequeue(out bool b); } The docs have this to say: ref and out parameters in C# cannot be…
Evgeniy Berezovsky
  • 18,571
  • 13
  • 82
  • 156
3
votes
4 answers

What is use of varchar output parameter in stored procedure - cannot 'return @myvarchar' but can 'select @myvarchar'

xample: CREATE PROCEDURE dbo.sp_Delete (@p1 INT, @p2 VARCHAR(10) OUTPUT) AS --@p1 will have calculations done and get a value for @p2 SET @p2 = 'test' RETURN @p2 Test: DECLARE @p2 VARCHAR(100) EXEC sp_Delete @p1 = N'1', @p2 =…
Peter PitLock
  • 1,823
  • 7
  • 34
  • 71
2
votes
1 answer

Access to output parameters when ObjectDataSource retrieves data from cache

I have an ObjectDataSource that it has an Output Parameter in its select method. And my ObjectDataSource is enabled caching. When ObjectDataSource retrieves data from database, I have access to output parameter in ObjectDataSource_Selected…
Ali Gonabadi
  • 944
  • 1
  • 10
  • 28
2
votes
1 answer

phpDocumentor Output Parameters

I've got a block of code which was written a while ago and I'm looking to document, but one of the functions has an output parameter - how should a phpDoc-block be written to specify that a parameter is an output parameter? Note - this isn't "I love…
Joe
  • 15,669
  • 4
  • 48
  • 83
1
2
3
8 9