I'm trying to run an sql query in an asp page.
Here's my query :
var sqlQuery = "insert into reparateurs (OBSERVATIONS, [Cazan OU Microlease], [Date Cde Microlease], [Date Inst Microlease], PHOTOS, [DATE AGREE], [NOM DU RESEAU]) values('" + observations + "', '" + cazanoumicrolease + "', '" + datecdemicrolease + "', '" + dateinst + "', '" + photo + "', dateagree + "', '" + nomreseau + "')" ;
[DATE AGREE] is a datetime field.
This gives the error message : The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Could anyone help me. Thank you
Here's my query :
var sqlQuery = "insert into reparateurs (OBSERVATIONS, [Cazan OU Microlease], [Date Cde Microlease], [Date Inst Microlease], PHOTOS, [DATE AGREE], [NOM DU RESEAU]) values('" + observations + "', '" + cazanoumicrolease + "', '" + datecdemicrolease + "', '" + dateinst + "', '" + photo + "', dateagree + "', '" + nomreseau + "')" ;
[DATE AGREE] is a datetime field.
This gives the error message : The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Could anyone help me. Thank you