not getting stored procedure Output Parameter value in VB.net

  • Thread starter Thread starter chinns
  • Start date Start date
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.
 
It will return the row count value to the SQLParameter object. Do you
have the SQLParameter's Direction property set to output?
 
Back
Top