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
 SQL Server Development (2000)
 sp Output

Author  Topic 

lane0618
Posting Yak Master

134 Posts

Posted - 2002-10-14 : 14:23:15
How do I set this up so that the output is print rather than the SQL?

declare @ctgry varchar(200)
select @ctgry = '
SELECT Ctgry
FROM dbo.Logic
WHERE ss = ' + @quote + @spNo + @quote

exec (@ctgry)
print (@ctgry)

Thanks,
Lane

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-10-14 : 14:34:53

exec master.dbo.sp_executesql @sql, @param, @ctgry out
print @ctgry

 


Jay White
{0}
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2002-10-14 : 21:28:13
Any way to retrieve an Output parameter in ASP or .NET?

Sam

Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-10-15 : 19:45:00
quote:

Any way to retrieve an Output parameter in ASP or .NET?



Yep. With an ADO Command object, you can create parameters and specify them as input or output. Then after executing the command object you retrieve the value of that parameter. I do it all the time in ASP.

Go to Top of Page
   

- Advertisement -