i am trying to insert current date in sql like this what i am missing i cant understand?
here is the code
ALTER PROCEDURE [dbo].[Emp_Updte]
(
@Name varchar(max),
@Emp_No varchar(50),
@Job_Title varchar (max),
@Nationality varchar(50),
@Administration varchar(50),
@Section varchar(50),
@Another_job varchar(50),
@health_no varchar(50),
@Exp_Date Date,
@National_ID varchar(50),
@reference varchar(50),
@updt_date date
)
AS
BEGIN
INSERT INTO dbo.Updated_Report(Name,Emp_No,Job_Title,Nationality,Administration,Section,Another_job,health_no,Exp_Date,National_ID,reference,updt_date)
values (@Name,@Emp_No,@Job_Title,@Nationality,@Administration,@Section,@Another_job,@health_no,@Exp_Date,@National_ID,@reference,getdate())
END
and c# code
con.Open();
SqlCommand comnd = new SqlCommand();
comnd.CommandType = CommandType.StoredProcedure;
comnd.CommandText = "Emp_Updte";
comnd.Parameters.AddWithValue("@Name", Name.Text);
comnd.Parameters.AddWithValue("@Emp_No", Emp_ID.Text);
comnd.Parameters.AddWithValue("@Job_Title", Job.Text);
comnd.Parameters.AddWithValue("@Nationality", DropDownList2.SelectedItem.Text);
comnd.Parameters.AddWithValue("@Administration", TextBox1.Text);
comnd.Parameters.AddWithValue("@Section", section.Text);
comnd.Parameters.AddWithValue("@Another_Job", Another_job.Text);
comnd.Parameters.AddWithValue("@health_no", health_no.Text);
comnd.Parameters.AddWithValue("@Exp_date", Exp_date.Text);
comnd.Parameters.AddWithValue("@National_ID", National_ID.Text);
comnd.Parameters.AddWithValue("@reference", DropDownList3.SelectedItem.Text);
comnd.Connection = con;
comnd.ExecuteNonQuery();
con.Close();