It might be helpful to try "Compact and Repair Database".Although practically empty (one table, one row, one field) the file has a size of 139MB!
Yes, done right now (few minutes ago).It might be helpful to try "Compact and Repair Database".
It is DateTime, then cDate is not needed (I tried anyway) and the error remains.(assuming the column is a TIMESTAMP type)
2) I changed the date to good ol US thinking 08/31/2020 and it workednet.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.x.x unknown token: in statement [SELECT * FROM Table1 WHERE OneDate = #31/08/2020#]
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:1) What was the error message? Mine was
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:2) I changed the date to good ol US thinking 08/31/2020 and it worked
To get your sample going I had to block out this code block in InitDB
I did it too, of course with leaving there the copy line, and now it works (even with date 31/08/2020).3) To get your sample going I had to block out this code block in InitDB
Forget it; deleting that part, the test is not executed, this is why I get no error.I did it too, of course with leaving there the copy line, and now it works (even with date 31/08/2020).
Evidently the db file was corrupt.
Thank you all![]()
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?Trying the last version of UCanAccess (5.0)...
... and your project works.I did it and updated the project attached.
Trying your project...
Because you need to know that you are not using the latest versionwhy not use the newest?
I just updated to use UCanAccess 5.0.0 and even it wants US collation on the date. Go figure... (Note: I'm not a UCanAccess expert)... and your project works.
@FunctionType(functionName = "CDATE", argumentTypes = { AccessType.MEMO }, returnType = AccessType.DATETIME)
public static Timestamp cdate(String dt) {
return dateValue(dt);
}