Hi I've ran into this error and have been looking at it for about an hour now and can't get it fixed.
cmd.CommandText = "INSERT INTO Appointments (ClientName, Period, Time, Treatment, Stylist) VALUES (@cName, @cDate, @cTime, @cTreat, @cStylist)";
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@cName", txtCName.Text);
cmd.Parameters.AddWithValue("@cDate", txtDate.Text);
cmd.Parameters.AddWithValue("@cTime", DDLTime.SelectedValue);
cmd.Parameters.AddWithValue("@cTreat", DDLTreat.SelectedValue);
cmd.Parameters.AddWithValue("@cStylist", DDLstylist.SelectedValue);
conn.Open();
cmd.ExecuteNonQuery();
Can anyone see any errors in the code to result in the syntax error.
Thanks in advance