Question : execute stored proc from asp doesnt run update

Hi all hope you can help

simple web page looking to update a row in sql from asp web page already have several stored procs set up using same methodolgy however this one wont work

when the proc is run local on the sql server executes and updates as expected however when run through teh page the exec statement is hitting teh server as seen in trace but teh update doesnt occur, using teh same statement from the trace will run if run locally exec statement below and stored proc is under that

exec sp_executesql N'EXEC Delete_Key @KeyNumber',N'@KeyNumber nvarchar(10)',@KeyNumber=N'145       '

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
LTER PROCEDURE [dbo].[Delete_key]
	-- Add the parameters for the stored procedure here
	(
	
	 @Key_number nvarchar (10)
)
	

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON; 




Update keys
Set active=(select case when active = 1 then 0 else 1 end
from keys where keynumber=(@key_number))

where keynumber=(@key_number)
end

Answer : execute stored proc from asp doesnt run update

>nchar(10)
so, why is the procedure parameter nvarchar(10) ?
resp, should the datatype not be nvarchar(10) everywhere?

apart from that, I presume the procedure is run twice in the web page ...
Random Solutions  
 
programming4us programming4us