Error : The Microsoft Jedt Dattabase engine stopped the process .....

  • Thread starter Thread starter Vensia
  • Start date Start date
V

Vensia

Dear all,

I have an Access form which is opening Ms SQL back end database. When the
user try to delete a record, then it displays error message :

The Microsoft Jedt Dattabase engine stopped the process because you and
another user are attempting to change the same data at the same time.

Actually there are several users are running the application, but the record
which will be deleted is not opened by the other user. The record can be
deleted after the error message appears.

Is there any solution for this error ?
Thanks.

Vensia
 
Hi,


In general we "play" with optimistic/pessimistic record locking,
accordingly to what we want to do. That error should be "trappable" anyhow,
in the Form onERROR event handling procedure (where you can decide to drop
the modification brought by "this" user, or to resubmit the modification, or
to modify further other fields, etc. )


Hoping it may help,
Vanderghast, Access MVP
 
Hi,

The Record Lock property of the form is No Lock (bound control). Any record
which I try to delete is not successful. When I open the form in single user
environment, the record is succefully deleted.
Can you give me the sample code to solve this matter ?
Thanks.

Vensia
 
Hi,


I can give code where the problem occur. But universal code that solve
that kind of problem, I just cannot.

If the problem is your code modifying a control bound to a field
actually displayed, the solution is to stop the VBA code doing that, or to
save (or to undo) the modifications before making the deletion you want to
do. If the problem is another human user starting to modify the record you
want to delete... there is no much solution than to change the locking
mechanic, and the first one (the other user, or your code) to get the lock
on the record will "win" and the other will get an "error". Remember that
your VBA code *is* ANOTHER user... since it is not the same user than the
one at the keyboard, and both can perform operations, independently.



Hoping it may help,
Vanderghast, Access MVP
 
Dear Michael,

This problem just only occurs when I'm using SQL Server as back end database
(using ODBC) and running in multi-user environment.
If the back end is Ms Access and multi-user, there is no any problem.
The code is like this :

Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click

If Not Me.NewRecord Then
Me!VoucherNo.SetFocus
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
End If

Exit_cmdDelete_Click:
Exit Sub

Err_cmdDelete_Click:
MsgBox Err.Description, vbInformation, "Delete"
Resume Exit_cmdDelete_Click

End Sub

I'm sure there is no another user access the same record which I want to
delete.
When I try the deletion, I directly add a new record, and then delete that
record, but it fails.
There is no error message displayed when I click the Delete button.
But when I try to delete using shortcut key CTRL + -, then the error message
is displayed :

The Microsoft Jedt Dattabase engine stopped the process because you and
another user are attempting to change the same data at the same time.

Thanks.
 
Hi,


I have never meet such a behavior. I asked around if someone can repro
or is aware of that.


Vanderghast, Access MVP
 
Hi,


Already got a suggestion from J. Ackermann:

This may occur if the Table has no PrimaryKey/Timestamp or
if there is a double(float) value which is rounded differently
by Floating-point Arithmetic.
 
Hi,

I have checked the table and there is a primary key (VoucherCode +
BranchCode)
But there is no any field with timestamp datatype and float datatype. Should
I add a field with timestamp datatype at the table ?
Thanks.
 
Hi,


The problem *may* be related to primary key made of multiple fields. I would
definitively try with a timestamps field, if that is easy to do, and to
test.... :-)


Hoping it may help,
Vanderghast, Access MVP
 
Hi,

I have checked the table and there is a primary key (VoucherCode +
BranchCode)
But there is no any field with timestamp datatype and float datatype. Should
I add a field with timestamp datatype at the table ?
Thanks.
 
Back
Top