Best answer: DO NOT DO THIS!
Unless you really NEED to return *TWO* result sets (record sets, data tables, whatever) from the SP (which is unusual, but sometimes done) you should do it all in ONE query.
Join the tables. Or, at worst, use a sub-select.
Example:
Code:
Table: Departments
deptid :: deptname
113 :: Administration
773 :: Engineering
...
Table: Employees
empid :: deptid :: lastname ...
101 :: 773 :: Jones
102 :: 113 :: Adams
103 :: 981 :: Somebody
CREATE PROCEDURE GetEmployeesByDepartmentName( @deptname NVARCHAR(100) )
AS
SELECT E.*
FROM Departments AS D, Employees AS E
WHERE D.deptid = E.deptid
AND D.deptname = @deptname
ORDER BY E.lastname
Give more details and we can surely find a way to avoid doing two SELECTs. Unless, again, you really *NEED* to get two resultsets. If so, maybe show the code in the "host language" that you will using.