Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 19th, 2006, 07:44 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access 2000 Write Conflict on Text Field

I have a text field on an Access 2000 form, which is for a 255 character text field in a linked table to SQL. If I attempt to exceed the 255 chatacters, it limits the text box (as expected) but then gives the error saying that 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.

We have checked around for solutions to this and have referred to the MS Knowledgebase article which talks about a BIT field problem or fields defined as floating point, which we know is not the case, as the table does not contain such.

Does anyone have any suggestions or (of course) better still has someone found the solution to this?

Regards,

Sean Anderson
__________________
Regards,

Sean Anderson
 
Old December 19th, 2006, 08:05 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

What are you trying to do, limit the number of characters entered into the textbox? You could try a OnKeyPress(or similar?) evaluation of the field length and pop up a message at, say, 250 chars and simply set the field position to the end of the 250 chars, so further typing would overwrite the last few chars? Food for thought?
 
Old December 19th, 2006, 08:12 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would like to resolve the problem at source rather than write in a workaround for it. Although the OnKeyPress could be written to adapt and limit the text box, the reality is that there are hundreds of fields in many, many forms for a number of applications, so it's not a feasible solution here.

Linked to a 255 character column, Access limits the text box to 255 characters, but throws this error when you reach 255 characters and save the record

Regards,

Sean Anderson
 
Old December 19th, 2006, 08:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

That sounds like a SQL error, not an Access error. Did you research the issue for SQL Server?

Perhaps you can change the data type in SQL Server to a a larger value, and leave the form value at 255.

I think the other "user" is the database application throwing the error.

Here is an interesting work around: Put a timestamp field in each table where you are having this problem, and allow nulls, and leave it null. Use the linked table manager to update all your table connections. Apparently this magically resolves locking issues.

Did that help?

mmcdonal
 
Old December 19th, 2006, 08:45 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks; I agree that it could be the SQL server acting as the second user and will investigate that route.

Have the timestamps already, but it made no difference.

Regards,

Sean Anderson





Similar Threads
Thread Thread Starter Forum Replies Last Post
write text file with fixed field length hugoscp Classic ASP Professional 0 June 27th, 2007 06:12 AM
write conflict iacon VB Databases Basics 1 July 3rd, 2006 03:36 PM
Write Conflict message mmcdonal SQL Server 2000 1 November 17th, 2004 11:39 AM
Write Conflict in continuous Form pinkandthebrain Access 2 July 18th, 2003 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.