473,379 Members | 1,184 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,379 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 1392

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.