Falta espacio entre el parámetro @SANC
y Where
.
Prueba esto:
cmd.CommandText = "UPDATE student_offense SET [email protected],DA[email protected],
[email protected],[email protected]" + " Where STUDENT_NO = @STUDENT_NO And
[email protected] And [email protected] And [email protected]";
Sugerencia: si su DATE_HAPPENED
el tipo de columna es Date
en su tabla, entonces debe enviar la Date
adecuada formato.
Intente esto:suponiendo que el usuario ingrese la fecha en dd-MM-yyyy
formato.
DateTime dt = DateTime.ParseExact(date_hapen.Text,"dd-MM-yyyy",
CutureInfo.InvariantCulture);
Ahora, mientras asigna el DATE_HAPPENED
el valor proporciona el siguiente formato
cmd.Parameters.AddWithValue("@DH",dt.ToString("yyyy-MM-dd"));