Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm using SQL server 2000 and have

Status
Not open for further replies.

automicgina

Programmer
Apr 10, 2002
18
US
I'm using SQL server 2000 and have the following stored proc:

CREATE PROCEDURE sp_get_info
( @getID smallint,
@getContent varchar(500) OUTPUT) AS

DECLARE @rc Int

SELECT @getContent = tableB.contentDescription
FROM tableA, tableB
WHERE tableA.pageID = @getID
AND tableA.typeID = tableB.typeID
ORDER BY tableB.typeID
Go

This stored proc returns a set of data. How do I show all the data in DataGrid? I tried to use list box instead but was having trouble passing the parameter for @getID.

Thanks!!
 
SELECT @getContent = tableB.contentDescription
FROM tableA, tableB
WHERE tableA.pageID = @getID
AND tableA.typeID = tableB.typeID
ORDER BY tableB.typeID

Remove the "@getContent = " from the statement. That is redirecting your output to that variable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top