473,765 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Write Conflict Message - Turn Off!

After searching the group and the net, I just can't believe after all
this work I'm going to have to sit through three Write Conflict
messages when I want to roll back and delete a record.

The action rolls back a new hire record, deleting it from a joining
table between employee and position - tblPosEmpRecord .

It's a many to many join.

The new hire action updates the employee with a new position and logs
it in the connecting record table.

If a user accidentally assigns the wrong position, they will need to
rollback the change and erase the connecting record, store a null in
the employee tables' position number, and store 'vacant' in the
position table for that record.

Here's the rollback:

Public Sub rollback()
On Error Resume Next
Dim temp_pos As Long
Dim temp_title As Long
Dim temp_salary As Currency

temp_pos = Forms!frmperson nelmain!frmTAB1 part4!curPos
temp_title = Forms!frmperson nelmain!frmTAB1 part4!curTitle
temp_salary = Forms!frmperson nelmain!frmTAB1 part4!curSalary

Forms!frmperson nelmain![tblPosition.Pos StatusID] = 2 'vacant
MsgBox "pos=vacant "

If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If

If Forms!frmperson nelmain!frmTAB1 part4!Designati on = 11 Then
'<----rollback for new hire!
Forms!frmperson nelmain![tblEmployee.Pos ID] = Null
If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If
Forms!frmperson nelmain![cboHistFilt] = Null
MsgBox "new hire rollback REcord Deleted"
Forms!frmperson nelmain!EmpStat us = 0 'inactive
Forms!frmperson nelmain!frmTAB1 part4!proPos.Re query
Exit Sub
End If

Forms!frmperson nelmain!frmTAB1 part4!PosID = temp_pos
Forms!frmperson nelmain![tblEmployee.Pos ID] = temp_pos
Forms!frmperson nelmain![tblPosition.Job ClassID] = temp_title
Forms!frmperson nelmain!Monthly Salary = temp_salary
Forms!frmperson nelmain![cboHistFilt] = temp_pos
Forms!frmperson nelmain![tblPosition.Pos StatusID] = 1 'filled
MsgBox "gothere? rollback"
If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If
Forms!frmperson nelmain!frmTAB1 part4!proPos.Re query
End Sub

It works, I just don't like the three WRITE CONFLICT messages popping
off. It's very obnoxios.

Thanks,

Christian

Oct 22 '06 #1
8 12950
On 21 Oct 2006 21:41:10 -0700, ch************@ yahoo.com wrote:
You rather get rid of the message than fix the underlying problem? No
problemo: just add "on error resume next" to the top of your
procedure.

Some of us would rather know what causes this, and fix the root cause.

-Tom.

>After searching the group and the net, I just can't believe after all
this work I'm going to have to sit through three Write Conflict
messages when I want to roll back and delete a record.

The action rolls back a new hire record, deleting it from a joining
table between employee and position - tblPosEmpRecord .

It's a many to many join.

The new hire action updates the employee with a new position and logs
it in the connecting record table.

If a user accidentally assigns the wrong position, they will need to
rollback the change and erase the connecting record, store a null in
the employee tables' position number, and store 'vacant' in the
position table for that record.

Here's the rollback:

Public Sub rollback()
On Error Resume Next
Dim temp_pos As Long
Dim temp_title As Long
Dim temp_salary As Currency

temp_pos = Forms!frmperson nelmain!frmTAB1 part4!curPos
temp_title = Forms!frmperson nelmain!frmTAB1 part4!curTitle
temp_salary = Forms!frmperson nelmain!frmTAB1 part4!curSalary

Forms!frmperso nnelmain![tblPosition.Pos StatusID] = 2 'vacant
MsgBox "pos=vacant "

If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If

If Forms!frmperson nelmain!frmTAB1 part4!Designati on = 11 Then
'<----rollback for new hire!
Forms!frmperso nnelmain![tblEmployee.Pos ID] = Null
If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If
Forms!frmperso nnelmain![cboHistFilt] = Null
MsgBox "new hire rollback REcord Deleted"
Forms!frmperson nelmain!EmpStat us = 0 'inactive
Forms!frmperson nelmain!frmTAB1 part4!proPos.Re query
Exit Sub
End If

Forms!frmperso nnelmain!frmTAB 1part4!PosID = temp_pos
Forms!frmperso nnelmain![tblEmployee.Pos ID] = temp_pos
Forms!frmperso nnelmain![tblPosition.Job ClassID] = temp_title
Forms!frmperso nnelmain!Monthl ySalary = temp_salary
Forms!frmperso nnelmain![cboHistFilt] = temp_pos
Forms!frmperso nnelmain![tblPosition.Pos StatusID] = 1 'filled
MsgBox "gothere? rollback"
If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If
Forms!frmperson nelmain!frmTAB1 part4!proPos.Re query
End Sub

It works, I just don't like the three WRITE CONFLICT messages popping
off. It's very obnoxios.

Thanks,

Christian
Oct 22 '06 #2
Actually, the routines work like I want them to work. There only
problem here is that I have a 'Write Conflict Error' that will not
respond to 'on error resume next' or even set warnings = false.
>From looking at the posts under this topic in this newsgroup, it seems
there is no way to turn it off.
I'm currently attempting to use update queries instead.
Very frustrating, especially when you have a deadline.

Christian

Oct 22 '06 #3
ch************@ yahoo.com wrote in
news:11******** *************@b 28g2000cwb.goog legroups.com:
Actually, the routines work like I want them to work.
Do you really want the routines to not work properly, give error
messages and fail to perform proper updates?

That's what you imply by saying "the way I want them to work".
>
Very frustrating, especially when you have a deadline.
Frustrating is having someone too smart to accept the fact that he
needs to fix the problem, not hide it.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 22 '06 #4
You don't think it has something to do with trying to set the Dirty to
"false" three times ??

He is trying to say the current record has not changed while it is
being changed ??

The update queries he was gonna try probably work better ??
PMG

Tom van Stiphout wrote:
On 21 Oct 2006 21:41:10 -0700, ch************@ yahoo.com wrote:
You rather get rid of the message than fix the underlying problem? No
problemo: just add "on error resume next" to the top of your
procedure.

Some of us would rather know what causes this, and fix the root cause.

-Tom.

After searching the group and the net, I just can't believe after all
this work I'm going to have to sit through three Write Conflict
messages when I want to roll back and delete a record.

The action rolls back a new hire record, deleting it from a joining
table between employee and position - tblPosEmpRecord .

It's a many to many join.

The new hire action updates the employee with a new position and logs
it in the connecting record table.

If a user accidentally assigns the wrong position, they will need to
rollback the change and erase the connecting record, store a null in
the employee tables' position number, and store 'vacant' in the
position table for that record.

Here's the rollback:

Public Sub rollback()
On Error Resume Next
Dim temp_pos As Long
Dim temp_title As Long
Dim temp_salary As Currency

temp_pos = Forms!frmperson nelmain!frmTAB1 part4!curPos
temp_title = Forms!frmperson nelmain!frmTAB1 part4!curTitle
temp_salary = Forms!frmperson nelmain!frmTAB1 part4!curSalary

Forms!frmperson nelmain![tblPosition.Pos StatusID] = 2 'vacant
MsgBox "pos=vacant "

If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If

If Forms!frmperson nelmain!frmTAB1 part4!Designati on = 11 Then
'<----rollback for new hire!
Forms!frmperson nelmain![tblEmployee.Pos ID] = Null
If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If
Forms!frmperson nelmain![cboHistFilt] = Null
MsgBox "new hire rollback REcord Deleted"
Forms!frmperson nelmain!EmpStat us = 0 'inactive
Forms!frmperson nelmain!frmTAB1 part4!proPos.Re query
Exit Sub
End If

Forms!frmperson nelmain!frmTAB1 part4!PosID = temp_pos
Forms!frmperson nelmain![tblEmployee.Pos ID] = temp_pos
Forms!frmperson nelmain![tblPosition.Job ClassID] = temp_title
Forms!frmperson nelmain!Monthly Salary = temp_salary
Forms!frmperson nelmain![cboHistFilt] = temp_pos
Forms!frmperson nelmain![tblPosition.Pos StatusID] = 1 'filled
MsgBox "gothere? rollback"
If Forms!frmperson nelmain.Dirty Then
Forms!frmperson nelmain.Dirty = False
End If
Forms!frmperson nelmain!frmTAB1 part4!proPos.Re query
End Sub

It works, I just don't like the three WRITE CONFLICT messages popping
off. It's very obnoxios.

Thanks,

Christian
Oct 22 '06 #5
PeaceManGroove wrote:
You don't think it has something to do with trying to set the Dirty to
"false" three times ??
Of course it does. That's how it's saving the changes. Any other way
and it won't work.

When I say *work* I will reiterate - it works exactly how I want it to.
Does that count for anything these days? Obviously MS Access doesn't
think so.

He is trying to say the current record has not changed while it is
being changed ??
That's a trick to save the record. It is a known trick and works
correctly. That's not what's causing the error. The error is caused by
me changing the value of one of the keys I believe - I need to do that
because I want the record to follow the employee to his new position.
There is no way to do this without programming.
>
The update queries he was gonna try probably work better ??
FYI the update queries are doing the trick. No more Mama Access
complaining.

What's surprising me about the people who have commented on this topic
in this thread and other threads is that - you all take it for granted
that Mama Access knows best in ALL situations.

The whole reason why they have a set warnings off and on error resume
next is because when you're programming - you should be allowed to have
control of your freaking program.

Sure it's helpful to have error messages but having error messages that
you can't shut off is just plain wrong. I can't begin to explain all
the things I've tried in Access that by all rights should work but
didn't. I've had to find so many work arounds for what I wanted to do -
it's amazing they call this programming at all (sure, some don't).

So now that I've done the same thing with update queries as I orignally
did by passing variables - what's the difference MS Access?

There is none. That's why Access is wrong. In one case it regards the
action as a 'write conflict' error that there is no way to shut off -
and the same action in a different context it won't remark on at all.

Christian

Oct 24 '06 #6
ch************@ yahoo.com wrote in news:1161665234 .938184.9700
@m7g2000cwm.goo glegroups.com:
That's why Access is wrong.
Yes, it doesn't work very well for what you're trying to do, does it?

What's the solution? Have you considered rewriting your whole application
for some other platform?

I recommend that course reluctantly, for probably you wouldn't post here
anymore if you did. That's sad but it's probably for the best.

Oh well, our loss will be someone else's gain.

Hope this helps!

--
Lyle Fairfield
Oct 24 '06 #7

Lyle Fairfield wrote:
Oh well, our loss will be someone else's gain.

Hope this helps!
How old are you again?

Speak for yourself next time Lyle. Attempting to speak for the Access
community and this global usenet forum in general is about as mature as
your other weaselly little comments.

How about this - if you don't know the answer to the question then
stfu.


Christian

Oct 24 '06 #8
ch************@ yahoo.com wrote in news:1161734008 .568914.13060
@i3g2000cwc.goo glegroups.com:
How about this - if you don't know the answer to the question then
stfu.
Well, sure. I won't feel guilty because you can use all the other helpful
suggestions you received.

--
Lyle Fairfield
Oct 25 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3483
by: Web Developer | last post by:
Hi, Question: Why is there an inherent conflict between uncompromising efficiency and portability in C++? Regards WD
3
3732
by: gwaddell | last post by:
I have an Access XP ADE application connected to a SQL Server 7.0 SP4 database. I have created a timestamp column in the main table. Unfortunately, I am now getting persistent write conflict errors. The order of operations are: 1. The application starts and loads the recordset into the form using a stored procedure. 2. I modify a field and press a save button which uses me.dirty=false to force a save. 3. The field is saved to the...
0
4945
by: Andrew L. Gould | last post by:
This email is semi-off topic; but documents a problem and the server-side solution when using MS Access as a client to many (all?) database servers. I decided to post the problem/solution because the MS Access error message is very misleading. For those of you creating applications using PostgreSQL with MS Access clients: PostgreSQL will allow bit fields to hold null values. I consider this to be valuable because a null boolean field...
6
94553
by: Max | last post by:
Hi, I have SqlServer 2000 as back end and Access 2000 as front-end. All tables from Sqlserver are linked to Access 2000. I am having write conflict problem with one of my form which is bound to a query which consist of let say tableA , TableB and TableC (all are linked tables from SqlServer. While the form is open I am modifying TableA through code on Form_AfterUpdate Event and getting the following message.
2
15418
by: RC | last post by:
I am getting the following error message. "Write Conflict this record has been changed by another user since you started edting it. If you save the record, you will overwrite the changes...." I have an Access 2002 database running on a single PC, the front and backend have not been separated yet. I have a form where I use a text box to jump from record to record. The form has about 12 bound text boxes on it. The table that is the...
2
1984
by: Mike MacSween | last post by:
I've been able, intermittently, to duplicate a problem a client had. Two users editing the same field of the same record. One saves. The other gets the 'another user has edited this record... do you want to save cancel clipboard' message when they attempt to save If I click Save (or is it overwrite), I get an error. 'Record could not be edited or deleted because table blah blah contains related records'. Which it does. I've tried this...
10
3567
by: Eric E | last post by:
Hi all, I am using an Access client linked to a PG 7.4 server via ODBC. I have a stored proc on the server that inserts rows into a table.particular table, accomplished via an INSERT within the body of the stored proc. The procedure does not explicitly commit this data, as no transactions are invoked. The problem is that Access will not modify these records via table or form view, giving its generic "Write conflict: another user has...
5
2931
by: quortex | last post by:
Hi all, I have a class which contains a method called GetMessage(). When I compile and unit test it all is well. However in the application I want to use it in there appears to be a conflict with Windows.h. I receive the following error: Error 1 error LNK2001: unresolved external symbol "public: class Messaging::Native::IMessage * __thiscall
4
8506
by: crystal | last post by:
I've checked the threads but haven't been able to come up with a solution to my issue. Help...... I have a simple form based on a table. Within the form is a subform that is also, through a Q, based on the same table. The code: Private Sub Select_BeforeUpdate(Cancel As Integer) On Error GoTo resetselect_Err
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.