大网数据广告活动
服务器运维问答

Conflict when editing new records in Access connected to PostgreSQL by ODBC

· 52CE 我爱测

I have a setup with Microsoft Access 2010 as a front-end and PostrgreSQL server 9.5.12 running on Linux as a back-end. Windows PC has PostrgreSQL ODBC driver version 10_02_0000 (currently latest) installed. The connection is Unic…

问题原文

原帖链接 · Thunderbeef · CC BY-SA 4.0

I have a setup with Microsoft Access 2010 as a front-end and PostrgreSQL server 9.5.12 running on Linux as a back-end. Windows PC has PostrgreSQL ODBC driver version 10_02_0000 (currently latest) installed. The connection is Unicode-based, settings are default, with the exception of Bool as char disabled and True is -1 enabled.

The problem I'm encountering is that new records being added from Access immediately become locked and cannot be modified/deleted afterwards. Error message is: Microsoft Access database engine stopped the process because you and another user are attempting to change the same data at the same time.

I'm definitely the only one accessing the database, and I can modify/delete older records without any issues. The issue only happens for records that I create myself.

已采纳解答

原帖链接 · Thunderbeef · CC BY-SA 3.0

I found the answer here:

https://stackoverflow.com/questions/25088970/ms-access-odbc-with-postgresql-table-write-conflict

My problem was caused by a timestamp field that had default now() constraint. Because timestamp in PostgreSQL by default has a higher precision compared to Access, automatic update via internal function now() caused a conflict due to mismatched values. Reducing precision in database by using timestamp(0) instead of just timestamp solves the problem.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-04-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0 / CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。