Another or the Similar Bug with Datetime2 from SQL (1 Viewer)

Minty

AWF VIP
Local time
Today, 13:01
Joined
Jul 26, 2013
Messages
10,371
I have worked around this but thought I should highlight this as it's very frustrating.

A SQL table (Azure SQL) has a Datetime2(7) column which when referenced from a form control in VBA come back with a TypeMismatch error (13)
Even trying to debug.print the offending value fails.


This is using the latest Version 18 ODBC driver and have ticked the option to enable support:
1699958127840.png


Trying to pass the date to a function requiring a date fails.
Formatting the date with Format() fails.

It reminded me why we don't use the newer datatype, but this was an update to a legacy system with the newer datatype and we had switched from version 11 ODBC driver to the latest one.

What a pain in the backside...

Version Info:
Microsoft® Access® for Microsoft 365 MSO (Version 2310 Build 16.0.16924.20054) 64-bit
ODBC Driver 18 for SQL Server - Version 2018.183.01.01
 

Users who are viewing this thread

Top Bottom