Adding column write error

chrisdd

New member
Local time
Today, 01:35
Joined
Jun 25, 2021
Messages
15
Hi all,
I've just added a new column to a table using with a bit datatype.

I refreshed the table in Access and everything seemed OK - I was able to create a new record for the table.

However if I then go back and try to edit the record I get a Write Conflict error

1718874025953.png

I've added new columns before and never had this issue so I'm a bit stumped - any help gratefully received.
 

Attachments

  • 1718873996417.png
    1718873996417.png
    404.6 KB · Views: 37
maybe you have also SQL to save the edited/new record aside from having it edited on the Form.
 
Hi all,
I've just added a new column to a table using with a bit datatype.

I refreshed the table in Access and everything seemed OK - I was able to create a new record for the table.

However if I then go back and try to edit the record I get a Write Conflict error

View attachment 114601
I've added new columns before and never had this issue so I'm a bit stumped - any help gratefully received.
This error is often seen when the back end is in SQL Server. Is that the case here?
 
The Problem is that Access is representing its Boolean values as 0 and -1 while SQL Server is representing Bits as 0 and +1.
A timestamp column in the table might help.
Or use a ...int data type instead.
 
Thank you @isladogs , the (absence of a) default value in combination with triple state is probably the most likely cause of the issue, while my -1/+1 situation might not be a that big a problem at all.
 
Hi @sonic8
Assuming the OP is referring to SQL Server linked tables, this is almost certainly the issue.
It took me months to track that issue down when I first made that mistake over 20 years ago.
The fix is of course to first update any null bit field values to a specified value (true or false) in SQL Server then set that as the default value

Access will treat any non-zero bit values as true whether the source data is +1 or -1. Similarly, if converting integer values to boolean in Access
 

Users who are viewing this thread

Back
Top Bottom