Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have store procedure ---
SQL
Create proc [dbo].[spUpdateEstmateDetail]
(
	@FileCode varchar(50)
   ,@WorkBriefName varchar(50)
   ,@WorkDetailedName varchar(200)
   ,@EstimationDate datetime
   ,@WID INT
   ,@MID INT
   ,@EstimatedQuantity float
   ,@Unit varchar(50)
   ,@EstimatedAmount float
   ,@EstimateID INT
   ,@IsUpdated INT OUTPUT
   
)
AS
IF NOT EXISTS(SELECT EstimateID FROM Estimate WHERE FileCode=@FileCode)
BEGIN
    print @EstimateID
	UPDATE Estimate 
			SET FileCode=@FileCode,
				WorkBriefName=@WorkBriefName,
				WorkDetailedName=@WorkDetailedName,
				EstimationDate=@EstimationDate,
				WID=@WID,
				MID=@MID,
				EstimatedQuantity=@EstimatedQuantity,
				Unit=Unit,
				EstimatedAmount=@EstimatedAmount
				WHERE EstimateID=@EstimateID
				print @EstimateID
            
	SET @IsUpdated=1
END
ELSE
BEGIN
	SET @IsUpdated=2

------------------------

and my table where the data .....and want to update records related to table data coulumn

My table ... Estimate
EstimateID  FileCode    WorkBriefName   WorkDetailedName    EstimationDate  EstimatedQuantity   Unit    EstimatedAmount WID MID
43  f120    tryr    rtee    2013-11-11 00:00:00.000 12  1   215     1   1
45  f122    gt      ytr     2013-01-02 00:00:00.000 15  150 1500    31  2
44  f123    gtr     ytr     2013-11-01 00:00:00.000 121 13  1500    31  2


---------------
how can i debugged in the Store procedure that where is errors
So here query of Store procedure execute successfully ...but not update the records so how can alter in SP which find the error where i am wronged
Posted
Updated 8-Nov-13 19:37pm
v3

1 solution

Please try this,,

place break-point on storeprocedure on top
select exec storeprocedurename
then click Run Button not Execute
 
Share this answer
 
Comments

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900