MS Access Write Conflict with DOUBLEs using ODBC
(1) By JR (jrobinsonx40sarax2ecom) on 2022-03-31 13:59:57 [source]
Using SQLITE3, werner ODBC driver, MS Access v16 32-bit, WINDOWS 10.
Table created in SQLite using DB Browser for SQLite:
CREATE TABLE MyTable3 ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name CHAR(32), x DOUBLE );
Populated MyTable3 as shown here using DB Browser for SQLite: id name x 1 Record 1 1 2 Record 2 3.14159265358979
Linked MyTable3 to an MS Access database (.accdb file) using ODBC driver from http://www.ch-werner.de/sqliteodbc/
Opened MyTable3 in datasheet view in MS Access, looks good:
id name x 1 Record 1 1 2 Record 2 3.14159265358979
Updated name field of first record from MS Access datasheet view, no problem:
id name x 1 Record one 1 2 Record 2 3.14159265358979
Tried to update second record the same way (change 'Record 2' to 'Record two'), BIG problem, get dreaded dialog whose title is "Write Conflict" with the message "This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made. n Copying the changes to the clipboard will let you look at the values the other user entered, and the paste your changed back if you decide to make changes." The dialog has three buttons:
"Save Record" which is DISABLED.
"Copy to Clipboard" which copies the changes I made (meaning I am the "other user??"): id name x 2 Record two 3.14159265358979
"Drop Changes" which reverts the record.
Drop Changes is the only functional option.
Going back to DB Browser for SQLite, I updated record 2 as follows:
id name x 1 Record 1 1 2 Record 2 3.141592
Going back to MS Access and refreshing id name x 1 Record one 1 2 Record 2 3.141592
NOW, edit record 2 in MS Access datasheet view is SUCCESSFUL: id name x 1 Record one 1 2 Record two 3.141592
Questions for the Forum: A) Is there a solution or am I wasting my time trying to get MS Access to play nice with the 8-byte doubles stored in SQLite3? B) Why does this happen?
We have legacy code in VBA we're required to preserve for a desktop single-user database. SQLite is preferred to handle large datasets exceeding the MS Access 2GB limit, and because its so simple to use vs SQL Server or MySQL. We've tried various hacks of adding a timestamp but none appear to work:
https://stackoverflow.com/questions/14461851/how-to-have-an-automatic-timestamp-in-sqlite
Links mostly discussing the problem relative to MS SQL Server and MySQL: https://stackoverflow.com/questions/13993301/editing-record-issues-in-access-sql-write-conflict https://stackoverflow.com/questions/44454990/cannot-edit-one-record-on-linked-table-write-conflict https://support.microsoft.com/en-us/office/add-a-date-or-time-stamp-to-new-records-2abe2c7b-7256-4814-aae5-47e4d262e5e9 https://stackoverflow.com/questions/3248967/write-conflict-messages-suddenly-start-happening-in-odbc-linked-tables https://forums.techguy.org/threads/solved-access-2007-write-conflict.697938/
Gratefully,
JR