Re: Returning Value to Web App via Stored Procedure
- From: IronSights <IronSights@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 14 Feb 2007 06:24:05 -0800
Thank You Hari,
The SP logic was correct. I made the change you suggested for the name.
The reason it was counting two times was because I had my VB messed up on
the ASP.NET application.
I had cmd.ExecuteNonQuery() twice.
Thank You.
"Hari Prasad" wrote:
Hello,.
A small suggestion. Please create the user defined stored procedures with a
name other thyan SP. SQL Server witll treat the SP's start with name SP as
system proc and scan system database.
So try to use a name like USP_.
Regarding the procedure, I am sure that inncrement will happen by 1 based on
the below logic.
Thanks
Hari
"IronSights" <IronSights@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C426E7D0-49E7-44D5-AE97-DE426106D95B@xxxxxxxxxxxxxxxx
I am trying to run an update stored procedure that will add 1 revision to
the
rev field and return the Value back to my Application. My number is
incrementing by 2 and not 1.
Here is my Stored Procedure
CREATE PROCEDURE dbo.sp_Update_file
@kbid big,
@filename nvarchar(50),
@rev big OUTPUT,
@moddate datetime,
@owner nvarchar(50),
@author nvarchar(50)
As
UPDATE KBFile
SET
rev = rev + 1,
filename = @filename,
moddate = @moddate,
owner = @owner,
author = @author,
@rev = (Select rev from kbfile where kbid = @kbid)
WHERE kbid = @kbID
GO
- References:
- Re: Returning Value to Web App via Stored Procedure
- From: Hari Prasad
- Re: Returning Value to Web App via Stored Procedure
- Prev by Date: Re: Returning Value to Web App via Stored Procedure
- Next by Date: RE: select date list
- Previous by thread: Re: Returning Value to Web App via Stored Procedure
- Next by thread: RE: select date list
- Index(es):
Relevant Pages
|
|