473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MSSQL Output Cursor Parameter

I have a stored procedure :

CREATE PROCEDURE STP_GETSTORELIST @RETCUR CURSOR VARYING OUTPUT
AS
set @RETCUR = CURSOR
FORWARD_ONLY STATIC FOR
SELECT ID,STORE_NAME FROM T_INF_STORE
ORDER BY STORE_NAME
OPEN @RETCUR

It has an output cursor variable.

How can i use it in .net?

There is no any sqldbtype.Cursor parameter

object my_DBNull;

my_DBNull = Convert.DBNull;

SqlParameter pm = new SqlParameter ( "@RETCUR",SqlDbType.Variant ,2000,
ParameterDirection.Output,true,0,0,"",DataRowVersi on.Default ,my_DBNull);

And above line is not working also.

I can do it in oracle with

create or replace procedure STP_GETSTORELIST(RETCUR out types.ref_cursor)
AS
begin
open RETCUR for
SELECT ID,STORE_NAME FROM T_INF_STORE;
end STP_GETSTORELIST;
OracleParameter pm = new OracleParameter ( "RETCUR",OracleType.Cursor,2000,
ParameterDirection.Output,true,0,0,"",DataRowVersi on.Default,my_DBNull);

Please send answer also to my e-mail too. (if exist)

Regards.


Jul 21 '05 #1
0 1393

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Philip Mette | last post by:
I am in a crunch and need to covert this Oracle statement to MSSQL. Is there any Oracle/MSSQL experts out there that can help me? I do not understand the syntax enough to modify this. Thanks so...
11
by: Axel | last post by:
Hi, I am currently creating an ASP page that returns a recordset of search result based on multiple keywords. The where string is dynamically built on the server page and that part work quite...
4
by: infidel | last post by:
I have a stored procedure that has a single output parameter. Why do I have to pass it a string big enough to hold the value it is to receive? Why can't I pass an empty string or None? >>>...
1
by: a | last post by:
how to send an xml dataset to a Stored Procedure in mssql I have an xml file that I read into a dataset. and I'm trying to use a stored procedure (see SPROC #1 below) that inserts this xml...
8
by: Yusuf INCEKARA | last post by:
I have a stored procedure : CREATE PROCEDURE STP_GETSTORELIST @RETCUR CURSOR VARYING OUTPUT AS set @RETCUR = CURSOR FORWARD_ONLY STATIC FOR SELECT ID,STORE_NAME FROM T_INF_STORE ORDER BY...
10
by: Mike | last post by:
Sql Server, Scope_Identity(), Ado.NET: Which is better? Using an output parameter to return Scope_Identity through ExecuteNonQuery(), or adding Select Scope_Identity() to the end of the...
0
by: itamar82 | last post by:
I have a SP running on mssql server 2005. When I try to execute the SP through asp I receive back an error that the parameter @City is not supplied, although I clearly do supply it. Here is my...
4
by: sujiforsql | last post by:
i have a stored procedure like below CREATE PROCEDURE display_Products @CategoryID int AS BEGIN DECLARE @authors_cursor CURSOR SET @authors_cursor =CURSOR FAST_FORWARD FOR SELECT TOP 10...
1
by: Mike P | last post by:
I am trying to return an output parameter to my code on executing a stored procedure. In Query Analyzer, it works with no problem, but when I run my ASP code below, the output parameter never...
3
by: leesquare | last post by:
Hello, I need some help getting output values from my stored procedures when using adodbapi. There's an example testVariableReturningStoredProcedure in adodbapitest.py, and that works for my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.