dataset doesnt get filled up {How do i fix this stored procedure}

Mar 31 2009 11:54 PM
I have written the following stored procedure:

ALTER PROCEDURE ProcGet

    -- Add the parameters for the stored procedure here
    @id as int output,
    @name as varchar(50) output
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

        SELECT @id = p_id, @name = p_name FROM pos

END
GO

"pos" table has three columns. but i only want to retreive two columns, when i used the storedprocedure like above the application doesnt retreive any values
but when i write the stored procedure to to retreive all teh columns in the tables it works perfectly well. How do i retrieve only two columns of data from teh above give table?

is there something wrong with my stored procedure?

Answers (1)