Questions tagged [output-parameter]

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

133 questions
2
votes
2 answers

High Traffic SQL Table intermittent Null Output Parameter

I'm getting an intermittent null value for an output parameter for a stored procedure I have. I'm wondering if it has to do with the NOLOCK inside the stored procedure. It works most of the time, it's intermittently failing. Especially under high…
Robert
  • 568
  • 1
  • 6
  • 21
2
votes
3 answers

Getting out parameter of stored procedure with C# only works when I put a breakpoint in my code

I have database connection setup with Entity Framework. I've created multiple stored procedures and one of them has an output parameter that I need in my application. Procedure in c# : public virtual ObjectResult>…
2
votes
2 answers

How to call stored procedure in Entity Framework Core with input and output parameters using mysql

I am using ASP.net Core 2.2 with Entity Framework core 2.2.6 and Pomelo.EntityFrameworkCore.MySql 2.2.0 for connectivity with MySQL, I have a stored procedure which takes 3 input parameters and 1 output parameter. I am able to call it in MySQL…
2
votes
0 answers

Executing dynamic SQL to execute Stored Proc and get resulting string

This is my stored procedure which is called every two mins by a SQL Job. USE [MyDB] GO /****** Object: StoredProcedure [dbo].[usp_Process_Invoice_USPs] Script Date: 27/03/2019 11:39:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER…
Mych
  • 2,527
  • 4
  • 36
  • 65
2
votes
1 answer

Object cannot be cast from DBNull to other types in stored procedure with output parameter

I want to use a stored procedure using SQL Server in a C# application that returns an output parameter but after trying many different ways I haven't realized how to do this. This procedure should return a variable/parameter called "recargo"…
Runsis
  • 831
  • 9
  • 19
2
votes
1 answer

Procedure or function 'sp256' expects parameter '@countcase', which was not supplied

Using SQL Server 2008. Wanted to output a parameter (@countcase) from a stored procedure called sp256. But when I exec the stored procedure, an error shows up: Procedure or function 'sp256' expects parameter '@countcase', which was not…
2
votes
3 answers

Output parameter of MySQL stored procedures via ADODB in MS Access (VBA) correct on one computer and random on another

I have tried (nearly) everything to isolate the problem, but I am lost. I have an MS Access application that uses ADODB to interface to a local MySQL database. I copied it to a new computer, but now the output parameters of the stored procedures…
2
votes
1 answer

Does ADODB fail on output parameters with optional input parameters?

I have a stored procedure in a SQL Server 2008 R2 database with an optional input parameter and an output parameter like this: CREATE PROCEDURE [dbo].[spCreateTicket] ( @TrackingCode varchar(25), @EmailAddress varchar(250) = null, …
feetwet
  • 3,248
  • 7
  • 46
  • 84
2
votes
1 answer

Informix: procedure with output parameters?

I searched a lot, but couldn't find anything.. I just want to ask if there's any way to create and call a procedure (Informix) with out parameters. I know how to return one or more values (for procedures and for functions), but this is not what I…
Kiril Kirov
  • 37,467
  • 22
  • 115
  • 187
2
votes
2 answers

Calling Stored Procedure with output parameters

This is MS Sql Server: I have wrapped the system stored procedure, sp_sequence_get_range, so that I can have it return with a simple select (I was not able to figure out how to deal with the OUTPUT parameters in my C# framework). This is the entire…
Kelly Cline
  • 2,206
  • 2
  • 33
  • 57
2
votes
2 answers

Mapping Output Parameters in SSIS OLE DB Source Editor

How can i map output parameter in OLEDB Soruce SSIS(BIDS 2008).In (BIDS 2012) we can specify the query parameter as input and output. SET FMTONLY OFF; EXEC [dbo].[ProcessPingErrorAlert_KeyValue] @AlterId = ?, @Hour = ?, @Day = ?, @TraceId =…
2
votes
2 answers

C# - Output SqlParameter uses different values then the ones given?

I have a SqlCommand which runs a stored procedure that contains two integer output parameters. Right before the SqlCommand runs I can see that the output parameters are set to the correct values, however when the command actually executes, it uses a…
Rachel
  • 130,264
  • 66
  • 304
  • 490
2
votes
3 answers

Use/Benefit of output parameter in stored procedures

Where do we need to use output parameter in a stored procedure? Does anyone have any real time experience to share? I searched a lot but not able to understand proper use of output parameter.
Vikant Pundir
  • 65
  • 1
  • 1
  • 5
2
votes
1 answer

How to access external DLL's static methods that incorporate output params in SQL Server

I know how to load a CLR DLL in SQL Server and access to its static methods which does not incorporate output parameters in their method signatures but what I cannot realize is how I can use methods which have output parameters. For example it is…
Farshid
  • 5,134
  • 9
  • 59
  • 87
2
votes
1 answer

SQLAlchemy get output parameters from a postgresql stored procedure

I am using Postgresql9.2 and SQLAlchemy0.8 . I have a stored procedure in database which has many out parameters and i want them to use by dot notation. But so far I have failed miserably. Below is how my code looks like. An example to show what i…
1 2
3
8 9