2) I changed the date to good ol US thinking 08/31/2020 and it worked
3) To get your sample going I had to block out this code block in InitDB
B4X:
If Result Then
Try
If Not(File.Exists(File.DirApp, accDBName)) Then
File.Copy(File.DirAssets, accDBName, File.DirApp, accDBName)
End If
AccDB.InitializeSQLite(File.DirApp, accDBName, False)
Catch
Log(LastException)
Result = False
End Try
End If
In my real project I get the same error message as you; in the test project I attached, I get a different one; this: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "#31": syntax error)
I had already tried to change the format of the past date as a parameter, but having the doubt of having tried in the real project, I tried again in the attached project and I get the same error: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "#08": syntax error)
Here is your project, working for me, with the block mentioned above blocked out. The test is executed. I did not repair the DB, I did nothing else but block out the code and change the date format.
That was going to be my question: Why are you using 4.0.4? If you are trying to be cross platform with B4A (4.0.4 is the last version working in Android) I would understand, otherwise, why not use the newest?
Just for the record: with cDate function the date format does not matter, as long as it is valid, the conversion from string to date is done internally , and you remove the ugly #'s.
Just tested #2020-08-31# and #2020-8-31# and it works (with 4.0.4 and 5.0.0). So using a / it expects US collation and with - it wants yyyy-mm-dd format (note: this is not a language specific string format specification, it just means 4 digit year, one or two digit month and one or two digit date)