[CLOSED] TRIGGER BEFORE UPDATE affected by Macro to reset 'BOOLEAN'
Posted: Thu Sep 22, 2022 5:54 pm
oActiveConnection = e.Source.Model.Parent.ActiveConnectionreference: https://forum.openoffice.org/en/forum/v ... 44#p415798
Hi All,
A macro the User is running is throwing an error, and we seem not understand why.
Please see the attached printscreens as well.
Any suggestions, ideas are much appreciated.
Dream The error appears to be related to:
UPDATE 11/05/2022; the issue is not related to the afore mentioned macro, but to the TRIGGER BEFORE UPDATE PERSON_BU.
Therefore this topic is closed and a new topic is opened https://forum.openoffice.org/en/forum/v ... p?t=108812
Hi All,
A macro the User is running is throwing an error, and we seem not understand why.
Code: Select all
Sub Main(e)
Const cResetPersonCheck = "UPDATE ""tPerson"" SET ""Check""=False"
Const cResetPhoneFaxCheck = "UPDATE ""tPhoneFax"" SET ""Check""=False"
Const cResetEmailAddressCheck = "UPDATE ""tEmailAddress"" SET ""Check""=False"
Const cResetAddressBareCheck = "UPDATE ""tAddressBare"" SET ""Check""=False"
oActiveConnection = e.Source.Model.Parent.ActiveConnection
oPrepPersonCheck = oActiveConnection.prepareStatement(cResetPersonCheck)
n = oPrepPersonCheck.executeUpdate()
oPrepPhoneFaxCheck = oActiveConnection.prepareStatement(cResetPhoneFaxCheck)
n = oPrepPhoneFaxCheck.executeUpdate()
oPrepEmailAddressCheck = oActiveConnection.prepareStatement(cResetEmailAddressCheck)
n = oPrepEmailAddressCheck.executeUpdate()
oPrepAddressBareCheck = oActiveConnection.prepareStatement(cResetAddressBareCheck)
n = oPrepAddressBareCheck.executeUpdate()
NextRecord 'Call Sub NextRecord
End Sub
Sub NextRecord
Dim oDocument As Object
Dim oDispatcher As Object
oDocument = ThisComponent.CurrentController.Frame
oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDispatcher.executeDispatch(oDocument, ".uno:NewRecord", "", 0, Array())
End sub
Any suggestions, ideas are much appreciated.
Dream The error appears to be related to:
Code: Select all
oActiveConnection = e.Source.Model.Parent.ActiveConnection
Therefore this topic is closed and a new topic is opened https://forum.openoffice.org/en/forum/v ... p?t=108812