Showing posts with label subform. Show all posts
Showing posts with label subform. Show all posts

Tuesday, March 20, 2012

Access/SQL "Write Conflict"

Hello,
I'm using a Access 97 Front-end and a SQL Server 2000 back-end.
When entering a subform on a form, information has to be saved to the
database.
But when entering the subform I get a "Write conflict" error in Access.
In SQL I'm using 3 tables with 1 view defined on those 3 tables. I use
INSTEAD OF INSERT/UPDATE/DELETE triggers to handle
INSERTS/UPDATES/DELETES.
In Access I use that View as a Source for the form.
Does anyone know why I get this error?
Roy
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
When I followed the execution of the code, I saw that the "Write
Conflict" error appeared after the following sub executed:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty Then If ap_ConfirmAction(Me, apUpdate) = vbNo Then
DoCmd.RunCommand acCmdUndo
'###ROY TOEGEVOEGD VOOR GENEREREN GUID
If IsNull(Me.dummyveld) Then
Set ObjGUID = CreateObject("event.util")
GUID = ObjGUID.GetNewGUID()
Me.dummyveld = Mid(GUID, 2, 36)
Set ObjGUID = Nothing
End If
End Sub
After the "End Sub" the "Write Conflict" error pops up.
I hope someone can help me.
Roy
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Access/SQL "Write Conflict"

Hello,
I'm using a Access 97 Front-end and a SQL Server 2000 back-end.
When entering a subform on a form, information has to be saved to the
database.
But when entering the subform I get a "Write conflict" error in Access.
In SQL I'm using 3 tables with 1 view defined on those 3 tables. I use
INSTEAD OF INSERT/UPDATE/DELETE triggers to handle
INSERTS/UPDATES/DELETES.
In Access I use that View as a Source for the form.
Does anyone know why I get this error?
Roy
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!When I followed the execution of the code, I saw that the "Write
Conflict" error appeared after the following sub executed:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty Then If ap_ConfirmAction(Me, apUpdate) = vbNo Then
DoCmd.RunCommand acCmdUndo
'###ROY TOEGEVOEGD VOOR GENEREREN GUID
If IsNull(Me.dummyveld) Then
Set ObjGUID = CreateObject("event.util")
GUID = ObjGUID.GetNewGUID()
Me.dummyveld = Mid(GUID, 2, 36)
Set ObjGUID = Nothing
End If
End Sub
After the "End Sub" the "Write Conflict" error pops up.
I hope someone can help me.
Roy
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Tuesday, March 6, 2012

Access Subforms not updatable

Hello,
I have an Access client that has a subform based on a VIEW. I wrote the view
with an instead of insert trigger. I also included the WITH VIEW_METADATA
option. The problem is this. If I have the VIEW_METADATA option in my VIEW,
the forms recordset is not updatable, but if it ALTER the VIEW, excluding the
option, then the recordset is updatable, but the trigger won't work. I need
the trigger to work. Is there anything that I can do.
Thank you,
Brandon
What is the trigger doing? Perhaps you can handle the whole process a
different way. Triggers often introduce unwanted complexity and have
unintended consequences.
--Mary
On Sat, 11 Sep 2004 19:39:02 -0700, "Brandon Campbell"
<BrandonCampbell@.discussions.microsoft.com> wrote:

>Hello,
>I have an Access client that has a subform based on a VIEW. I wrote the view
>with an instead of insert trigger. I also included the WITH VIEW_METADATA
>option. The problem is this. If I have the VIEW_METADATA option in my VIEW,
>the forms recordset is not updatable, but if it ALTER the VIEW, excluding the
>option, then the recordset is updatable, but the trigger won't work. I need
>the trigger to work. Is there anything that I can do.
>Thank you,
>Brandon