Re: Returning Value to Web App via Stored Procedure



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



.



Relevant Pages

  • Re: Returning Value to Web App via Stored Procedure
    ... A small suggestion. ... Please create the user defined stored procedures with a ... @moddate datetime, ... WHERE kbid = @kbID ...
    (microsoft.public.sqlserver.mseq)
  • Re: prefixing the tables with owner name
    ... within stored procedures, if you use owner.objectname - it performs ... if you consistently use owner name on the objects referred within a stored ... sql server can use in-memory plan on every execution. ... > thks in advance. ...
    (microsoft.public.sqlserver.programming)
  • System Stored Procedure Permissions
    ... I have system stored procedures in a databse ... somehow instead of showing the owner as dbo and type as ... database. ...
    (microsoft.public.sqlserver.security)
  • Re: Stored Procedure Owner Issue
    ... "Aaron Weiker" wrote: ... >> analyzer but I can't run these stored procedures from a scheduled job. ... >> to change the owner name for these objects, ... > In order to execute these jobs you have a couple options. ...
    (microsoft.public.sqlserver.programming)
  • How to find owner of objects
    ... I need to find the owner of jobs and stored procedures that have been ... This the notification message I receive: ... of job Restore DukeEDI_TLog has server access (reason: ...
    (microsoft.public.sqlserver.security)