I wonder if the Stored Procedure parser is confused by the "SET" on a line by itself. Try the following where I put the UPDATE statement all on one line.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[web_usp_empData_Update]
@id bigint,
@Code nvarchar(10),
@Name nvarchar(50),
@Address nvarchar(150),
@Tel nvarchar(20),
@HP nvarchar(20),
@email nvarchar(50),
@NRIC nvarchar(20),
@Jobtitle nvarchar(50),
@Dept nvarchar(20)
As
Begin
Update empData Set Code=@Code,Name=@Name,Address=@Address,Tel=@Tel,HP=@HP,email=@email, NRIC=@NRIC,Jobtitle=@Jobtitle,Dept=@Dept Where id=@id
End
Also, try this where I create a new
cmd
object instead of re-using an existing
cmd
object.
cmd = New SqlCommand
cmd.Connection = conn
cmd.CommandText = ("web_usp_empData_Update")
cmd.Parameters.Add(New SqlParameter("@id", Session("empID")))
cmd.CommandType = CommandType.StoredProcedure
...