Getting error that incorrect syntax near Date and my c# code
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//DateTime date1 = Convert.ToDateTime(txtDate.Text);
GridViewRow row = GridView1.Rows[e.RowIndex];
int customerId = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0]);
string name = (row.FindControl("txtName") as TextBox).Text;
string country = (row.FindControl("txtCountry") as TextBox).Text;
string Date = (row.FindControl("txtDate") as TextBox).Text.ToString().Trim();
string query = "UPDATE Customers SET Name=@Name, Country=@Country Date=@Date WHERE CustomerId=@CustomerId";
con = new SqlConnection("Data Source=IT;Integrated Security=SSPI;Initial Catalog=Institute");
{
using (SqlCommand cmd = new SqlCommand(query))
{
cmd.Parameters.AddWithValue("@CustomerId", customerId);
cmd.Parameters.AddWithValue("@Name", name);
cmd.Parameters.AddWithValue("@Country", country);
cmd.Parameters.AddWithValue("@Date", Date);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
}
GridView1.EditIndex = -1;
this.BindGrid();
}