Ask Your Question
0

LO BASE 6.2.3.2 -FB3.0 Updating record in form triggers for all records

asked 2019-07-04 01:31:58 +0200

deadbody408 gravatar image

I have a form for inputting part data into a table, there is a trigger to update a column with the date modified. the trigger works when directly inputting data into the table but when entering data into the form the trigger updates all the records on the table, making the date modified all the same for every record. Any help would be much appreciated

Attached: Pricelist Database C:\fakepath\PriceListV3.odb

Form in Question: frmPartHalfScreenQuickEntry

Trigger in Question

CREATE TRIGGER TRGDATEMODIFIED for "tblPart"

before insert or update Position 0

AS

BEGIN

new."Date Modified" = current_timestamp;

END

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-07-04 08:07:16 +0200

Ratslinger gravatar image

Hello,

This is not a Base problem. Let me explain.

First had difficult time since you did not mention the many triggers you had created. Extracted the firebird database from the .odb and set it into a Firebird server. There it was easier to work with the triggers. BTW, same problem in server mode. All dates changing.

First tried splitting mentioned trigger into two one for new & another for updates. New worked but updates still had problem. Removed ALL triggers and started creating new ones, one at a time. There was never a problem until I got to TRGSETTOTALPRICE. Once entered, the problem returned. Removed, problem goes away. Can't see anything wrong with it.

Believe the problem lies somewhere as a conflict with another trigger but got tired of trying to figure it all out.

Aside from that, this is really a site for LO problems which this is not. It is a Firebird problem and actually one specifically with triggers. While someone may have more patience looking through these triggers, it may be more productive for you to find a Firebird forum or Stack Overflow and present the problem there. Be sure to present the entire situation and not just what you think is the cause.

edit flag offensive delete link more

Comments

1

Best place for that type of question would be the user support mailing list at the Firebird project: http://firebirdsql.org/en/mailing-lists/

You will find details on joining that mailing list at the web address above.

DrewJensen gravatar imageDrewJensen ( 2019-07-04 18:43:03 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-04 01:31:58 +0200

Seen: 73 times

Last updated: Jul 04 '19