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
 General SQL Server Forums
 New to SQL Server Programming
 how do i see teh results of a storedproc

Author  Topic 

tariq2
Posting Yak Master

125 Posts

Posted - 2010-11-08 : 11:36:38


Hi, how do I see the result of a storedproc?
For the below, when I execute I receive 'Command(s) completed successfully'

Thats great but how do I see the actual record?
Thanks


create procedure usp_tazz

@usp_tazz varchar(12)

AS

select * from d_jobattributes
where jobid = @usp_tazz


exec usp_tazz '1'


TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2010-11-08 : 11:42:09
Well, if you run that exec statement from a query window in Management Stuidio then you should see the results in the "results" pane.
If you are running that statement from an application then it depends on your front end application code/architecture. You, the developer, need to use some technique to populate a control with data returned by that SP.


Be One with the Optimizer
TG
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-11-09 : 05:23:59
You should have used GO before exec usp_tazz '1'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

tariq2
Posting Yak Master

125 Posts

Posted - 2010-11-09 : 10:27:56
Thank you Madhivanan
Go to Top of Page
   

- Advertisement -