[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Can't update MS SQL2005 table from MS Access form

Posted on 2012-03-12
5
Medium Priority
?
262 Views
Last Modified: 2012-03-12
I'm trying to update a field in an MS SQL 2005 table from a form in MS Access.  I keep getting a Write Conflict but I'm the only one using the db.  I get the same error even if I try to update a record in the table without going through the form. I'm the db admin for the database.  I can append with no problem.  The table has a primary key.  Any ideas?
0
Comment
Question by:WhamMcC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 37711238
If you have bit  fields in your table try setting allow nulls to false
0
 

Author Comment

by:WhamMcC
ID: 37711368
You may be onto something but when I attempt to change the data type not allow nulls, I get the following error message:


'Rebates' table
- Unable to modify table.  
Cannot insert the value NULL into column 'Prep01', table 'dbSalesInfo.dbo.Tmp_Rebates'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Is this because I have nulls  and if so how can I get rid of them?
0
 

Expert Comment

by:gnetgnet
ID: 37711909
Can you initialize the values to spaces if char or 0 if numeric?
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 37711981
Set the default value of the field to False and if you have any existing NULLS in your bit column, make a backup and run an update query to set them to false:

UPDATE YourTable
SET YourField = False
WHERE YourField IS NULL


(Allowing nulls in bit fields is one consistent cause of that WriteConflict error that I have seen in upsized Access databases.)
0
 

Author Closing Comment

by:WhamMcC
ID: 37712002
Thank you!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question