MS Access and ODBCConnection: Error when inserting a date! lazarus / 16-Databases ---------------------------------------------------------------------- Jvan · 2021-06-01 19:33 I have a MS Access database with a date column. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SQLQuery2.ParamByName('FECHA').AsDate := EncodeDate(arr1[2].ToInteger, arr1[1].ToInteger, arr1[0].ToInteger);... SQLQuery2.ExecSQL();SQLTransaction1.Commit(); I got an error message, but when I change the date column to text, it works ok, but I need it as a date. ---------------------------------------------------------------------- wp · 2021-06-01 20:57 The computer is right: April has only 30 days... (https://en.wikipedia.org/wiki/Knuckle_mnemonic). Nevertheless, I checked if dates work as parameters in Access queries. Yes, they do, no need for the surrounding '#', the '/' date separator and the month-day-year order - see attached demo. ---------------------------------------------------------------------- Jvan · 2021-06-01 22:34 Thanks.