I get an error for sql test codes (1)-(2)-(3).
...
sql = "SELECT *, DATEDIFF(day, date(), ActDate) AS V_datediff FROM Activity" (1)
sql = "SELECT *, DATEDIFF(day, '20/02/2020', '20/05/2020') AS V_dateDiff FROM Activity" (2)
sql = "SELECT *, DATEDIFF(day, '2020/02/20', '2020/05/20') AS V_DateDiff FROM Activity" (3)
sql = "SELECT * FROM Activity ORDER BY Actdate ASC" (=no error)
rs.Open sql, Conn
The same error message for (1)-(2)-(3)
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Thanks for tips.
...
sql = "SELECT *, DATEDIFF(day, date(), ActDate) AS V_datediff FROM Activity" (1)
sql = "SELECT *, DATEDIFF(day, '20/02/2020', '20/05/2020') AS V_dateDiff FROM Activity" (2)
sql = "SELECT *, DATEDIFF(day, '2020/02/20', '2020/05/20') AS V_DateDiff FROM Activity" (3)
sql = "SELECT * FROM Activity ORDER BY Actdate ASC" (=no error)
rs.Open sql, Conn
The same error message for (1)-(2)-(3)
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Thanks for tips.