Questions tagged [output-parameter]

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

133 questions
0
votes
1 answer

Multiple parameter in powershell

I have a powershell script to call the SP which is shown below $sqlTableConnection = New-Object [System.Data.SqlClient.SqlConnection]("Server=1xx.xx.xxx; Database=dbName; Integrated Security= True"); $sqlTableCmd = New-Object…
Zerotoinfinity
  • 6,290
  • 32
  • 130
  • 206
0
votes
0 answers

C DllImport error System.AccessViolationException Attempted to read or write protected memory

I have one C DLL which I am using into C# code (.net 4.0) When I access the C method, it raises below exception System.AccessViolationException {"Attempted to read or write protected memory. This is often an indication that other memory is…
Kiran
  • 1
  • 4
0
votes
1 answer

A call to PInvoke function xxx has unbalanced the stack

I am using C DLL in C# code (.net 4.0) in a console application and facing issue. When I call the C method it raises the below exception. "A call to PInvoke function 'ProcessFilesC' has unbalanced the stack. This is likely because the managed…
Kiran
  • 1
  • 4
0
votes
2 answers

How to print message in SQL output parameter

I have a stored procedure like below. How I can print the message in the output parameter @ErrorMsg in my aspx page. ALTER PROC [dbo].[ItemMasterIns] ( @ItemCode VARCHAR(30), @ItemDesc VARCHAR(100), @ErrorMsg VARCHAR(200) OUTPUT …
0
votes
2 answers

Unable to retrieve out params from Oracle stored procedure in C#

Here is my stored proc (made it simple to try to isolate the issue, so all I'm doing now is setting the OUT params): PROCEDURE DequeuePPLPlatformMsg ( msgType OUT VARCHAR2, msgBody OUT VARCHAR2) IS …
0
votes
1 answer

Creating a procedure that takes in a variable then returns another to the calling procedure in Excel VBA

I want to create functionality that will allow me to pass a variable to a procedure, have it open a file based on that variable, and then return the filepath into calling procedure. I have the code for opening the file etc, but as there are…
Marc L
  • 837
  • 9
  • 19
  • 40
0
votes
1 answer

Passing value from int as output parameter to a int Variable using LINQ in c#

I have a stored Procedure as ALTER PROCEDURE [dbo].[customers_iu] (@intId as int, @strName as nvarchar(100), @strSname as nvarchar(100),@intInsupdt as int = 0, @intGnrtdid as int OUTPUT) AS BEGIN SET NOCOUNT ON; if @intInsupdt = 1 begin insert…
user1982736
0
votes
1 answer

Run a query from a stored procedure's OUTPUT parameter

The following script is intended to take a dynamically-produced SQL statement and then run it. The script will run, but it doesn't return the results that are intended, but the text of the dynamic SQL string. The string produced is the string that…
wootscootinboogie
  • 8,461
  • 33
  • 112
  • 197
0
votes
3 answers

How to us a base class in an output parameter

Say I have code like this: class B {} class D : class B {} void MakeD(int params, D** out, int* status_out); Today I call it like this: B* b; if (use_d) { D* d; MakeD(params, &d, &status) b = d; } else... Is there a cleaner way to write…
Adam Berkan
  • 115
  • 1
  • 6
0
votes
1 answer

Getting a varchar back from a SQL Server 2008 Stored Procedure in a VB.net program

I'm trying to get a string (nvarchar) from a stored procedure in my VB.net program. When I run the SP in SQL Studio, it's fine, but when I try to run it in the program I get the error: Error converting data type nvarchar to int. Here's my…
0
votes
1 answer

Accessing both stored procedure output parameters AND the result set in Entity Framework?

Is there any way of accessing both a result set and output parameters from a stored procedure added in as a function import in an Entity Framework model? I am finding that if I set the return type to "None" such that the designer generated code ends…
MS.
  • 696
  • 7
  • 10
0
votes
1 answer

PHP bindParam does not seem to work with a PARAM_INT out parameter

The following is my MySQL stored procedure: DROP PROCEDURE IF EXISTS sp_authenticate; CREATE PROCEDURE sp_authenticate(IN user_name VARCHAR(50), IN password1 VARCHAR(50), OUT nmatch INT) BEGIN SELECT COUNT(*) INTO nmatch FROM user1 u …
Agnel Kurian
  • 57,975
  • 43
  • 146
  • 217
-1
votes
1 answer

How to make an output parameter in Stored Procedure in my scenario?

I have a query, that will insert a data into my table, and it should return one value My Stored Procedure ALTER PROC FspCreateRequest @RequestDescription nvarchar(200), @CreatedBy varchar(30), @CreatedDate datetime, @Region nchar(10), @RequestID…
Liam neesan
  • 2,282
  • 6
  • 33
  • 72
1 2 3
8
9