Passing cursor/result set to extended stored procedure

Passing cursor/result set to extended stored procedure

Post by Neil W » Sat, 12 May 2001 02:56:04



Is there a way of passing a cursor or result set to an extended stored
procedure as an input parameter?  E.g.,

declare myCursor cursor for select ...
Open myCursor
exec xp_myextendedproc myCursor

the parameter simply comes through as an integer value.

Thanks for any tips.

Neil

 
 
 

Passing cursor/result set to extended stored procedure

Post by Bart Dunc » Fri, 25 May 2001 05:00:40


Neil -- no, you can't pass a T-SQL cursor to an extended stored proc.  Your
options are to pass the necessary data to your xp via the available scalar
data types, or have your xp make a loopback connection to SQL to retrieve
the data that it needs.

HTH -
Bart

--------------------


Newsgroups: microsoft.public.sqlserver.programming
Subject: Passing cursor/result set to extended stored procedure
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

Date: Thu, 10 May 2001 17:56:04 GMT
NNTP-Posting-Host: 24.228.26.7

X-Trace: news1.rdc1.ct.home.com 989517364 24.228.26.7 (Thu, 10 May 2001
10:56:04 PDT)
NNTP-Posting-Date: Thu, 10 May 2001 10:56:04 PDT

Path:
cppssbbsa01.microsoft.com!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de
!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home
com!news1.rdc1.ct.home.com.POSTED!not-for-mail
Xref: cppssbbsa01.microsoft.com
microsoft.public.sqlserver.programming:163798
X-Tomcat-NG: microsoft.public.sqlserver.programming

Is there a way of passing a cursor or result set to an extended stored
procedure as an input parameter?  E.g.,

declare myCursor cursor for select ...
Open myCursor
exec xp_myextendedproc myCursor

the parameter simply comes through as an integer value.

Thanks for any tips.

Neil