PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET not getting stored procedure Output Parameter value in VB.net

Reply

not getting stored procedure Output Parameter value in VB.net

 
Thread Tools Rate Thread
Old 30-06-2003, 11:00 AM   #1
chinns
Guest
 
Posts: n/a
Default not getting stored procedure Output Parameter value in VB.net


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.




  Reply With Quote
Old 30-06-2003, 02:03 PM   #2
Jay Pondy
Guest
 
Posts: n/a
Default Re: not getting stored procedure Output Parameter value in VB.net

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

chinns wrote:
> 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.


--
Direct access to this group with http://web2news.com
http://web2news.com/?microsoft.publ...ramework.adonet
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off