not getting stored procedure Output Parameter value in VB.net

C

chinns

i am not getting the output parameter value in vB.net
after executing the storedprocedure.


CREATE PROCEDURE Search_Assets_By_String
@Search varchar(50),
@Descriptive bit,
@RC int Output

AS

IF @Descriptive = 1
BEGIN
Select * from Assets where (Name LIKE '%' +
@Search + '%' OR Description LIKE '%' + @Search + '%')
order by RowType desc, Name
SET @RC = @@ROWCOUNT
END
ELSE
BEGIN
Select * from Assets where (Name LIKE '%' +
@Search + '%') order by RowType desc, Name
SET @RC = @@ROWCOUNT
END
GO


plz tell wether this will return the value to
sqlparameter object value.
 
J

Jay Pondy

It will return the row count value to the SQLParameter object. Do you
have the SQLParameter's Direction property set to output?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top