Hi Friend,
Hi, i have posted the similar kind question befor ebut still cannot figureout what teh ptoblem is i have removed all
unessary parenthsis, addition PK search in my update statement still my update procedure doesnt update the table...
I've tested this with the SQL server management studio express by right click on Stored Procedure (SP) --> execute
when i alter data in table it doesnt update the table.... i'm sure that if i fix this i would able to capture concurrecy violations
here her snippet of my SP
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[ProcUpdateDesignation] ( @Name nvarchar(50), @AnnualLeaveMax int, @SickLeaveMax int, @EntryDate datetime, @UpdatedDate datetime, @Original_DesigIndex int, @Original_Name nvarchar(50), @Original_AnnualLeaveMax int, @Original_SickLeaveMax int, @Original_EntryDate datetime, @Original_UpdatedDate datetime ) AS SET NOCOUNT OFF; UPDATE [tblDesignations] SET [Name] = @Name, [AnnualLeaveMax] = @AnnualLeaveMax, [SickLeaveMax] = @SickLeaveMax, [EntryDate] = @EntryDate, [UpdatedDate] = @UpdatedDate WHERE ( [DesigIndex] = @Original_DesigIndex AND [Name] = @Original_Name AND [AnnualLeaveMax] = @Original_AnnualLeaveMax AND [SickLeaveMax] = @Original_SickLeaveMax AND [EntryDate] = @Original_EntryDate AND [UpdatedDate] = @Original_UpdatedDate )
|
I have uploaded the DB and you can downlaod it from the followin link http://www.mediafire.com/?t3iojnd2mmx Thanks
petre
SreekanthPosted Nov 16, 2009, 7:49 AM
petre ricardoPosted Nov 16, 2009, 7:19 AM
thanks for the reply.... i think it's
necessary cast @ DB level however, at component orient its necessary, nevertheless, this is not a type issue more of passing date values of value bound columns... so it doesnt update!
petre
Nilanka DharmadasaPosted Nov 16, 2009, 12:51 AM
I focued on these two column.
does the data in these columns contain the time componenet as well? If so, the parametrs you passed from SP, should contain the exact time componet too. Otherwise, this update statement will not be executed.
If you want to remove the time component and check, do following.