B4J Question [SOLVED] UCanAccess - error on a simple query with a date-time field

LucaMs

Expert
Licensed User
Longtime User
This query:

SELECT * FROM Table1 WHERE OneDate = #31/08/2020#

works perfectly in Access sw, raises an error in b4j using ucanaccess library.
 

Attachments

  • UCanAccessTest.zip
    16 KB · Views: 243
Last edited:

OliverA

Expert
Licensed User
Longtime User
This query:

SELECT * FROM Table1 WHERE OneDate = #31/08/2020#

works perfectly in Access sw, raises an error in b4j using ucanaccess library.
I just tried this in Access. In the SQL View (where you can type/see the raw SQL), I pasted the above statement. Running the SQL works and (presumably) returns the desired result. But, here it gets interesting, when you switch to the Design View, the Criteria field shows #8/31/2020#

1599078251617.png

1599078263161.png

So it looks like Access may actually not sent your query as it is typed out to the underlying DB, but change the date to #8/31/2020# before executing the query.
 
Upvote 0
Top