September 7, 2007 at 12:53 am
Some sql server procedures return information like select query ( i.e some replication procedure sp_helppublication). I can retrieve select query output in cursor but I could not get procedure output in cursors. in java resultset can be retrieved using callable statement but how information can be retrived in T-SQL.
September 7, 2007 at 1:48 am
Kirti,
have a look at http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=396141
Peter Larsson posted:
SELECT a.*
FROM OPENROWSET('SQLNCLI', 'Server=(local);Trusted_Connection=yes;', 'exec sp_spaceused') AS a
Andras
September 7, 2007 at 12:11 pm
Just keep in mind that because you are using 2005 you have to enable that feature before using any ROWSET function.
* Noel
September 7, 2007 at 1:37 pm
You are right Noel. I mentioned it in the other thread, it is 'Ad Hoc Distributed Queries' that you need to enable, which may not be allowed/you may not want to allow.
Andras
September 7, 2007 at 2:46 pm
Ooops sorry. I didn't followed the link
* Noel
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply