hi, im using VS.net 2005 for developing a web application.im using stored procedure for inserting records into database.i want to insert time and task for a selcetd employee but its not working. kindly help me.her's my stored procedure:

create PROCEDURE [dbo].[AssignAndStore] 
	-- Add the parameters for the stored procedure here
	@name varchar(50),
@TaskAssigned nvarchar(50),
@TimeAssigned nvarchar(50)
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.

--insert query
insert into Employee(TaskAssigned,TimeAssigned)
values (@TaskAssigned,@TimeAssigned)
      WHERE  name  = @name
--im getting error with where clause


im using dropdwn list for task and name and textbox for time.

You dont need a where for an insert because your not filtering out data, its a new record to the table. only an update, select or delete statements need a where clause.

You probably meant to do
update Employee
SET TaskAssigned=@TaskAssigned,
WHERE name = @name

Also, id recommend assigning an identity ID to each employee and updating using the id

thanx alot. it solved my problem.