Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 can we use cursor as optional output parameter

Author  Topic 

janbhani
Starting Member

2 Posts

Posted - 2007-03-29 : 01:53:13
I have two stored procedure as given below:

1. CREATE PROCEDURE dbo.INS_ACC_ASSETS

2. CREATE PROCEDURE dbo.GET_ACCOUNTS
( @p_strUserId VARCHAR(64),
@p_strLevel VARCHAR(64)= 'APPLICATION_LEVEL',
@returnCursor CURSOR VARYING OUTPUT = NULL (here raising syntax error)
)

proc1 processing depends upon proc2 so we used cursor as output parameter in proc2,it was working fine, proc1 was getting cursor result through output parameter, but now i have to call proc2(dbo.GET_ACCOUNTS) from JDBC, as we all know that those procedures can not be called from Database APIs that have cursor as output parameter

Finally my question is can we use @returnCursor as optional output parameter so that we can call dbo.GET_ACCOUNTS simaltaneoulsy from procedures as well as through JDBC.

Thanks in Advance

jkumar
   

- Advertisement -