Focal Point
[CLOSED] WF Maintain -- if no commit is issued, does data save?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6127088036

May 17, 2013, 03:55 PM
John_Edwards
[CLOSED] WF Maintain -- if no commit is issued, does data save?
I think I'm seeing a difference between 7.6 and 7.7, but I don't see it doc'd. In 7.7, if a Maintain case comes to an end but does not explicitly issue the Commit command, are the updates in the case saved or no? I know I know, good programming practices and all that, but I have a big-*** system and a change in behavior with our conversion to 7.7.

J.

This message has been edited. Last edited by: <Kathryn Henning>,



May 18, 2013, 05:06 AM
Alan B
John

I thought that an implicit commit was only issued at the normal ending of procedure, not end of case.

A quick test in 7.705 showed that without commit the DB was locked until end of procedure, with commit lock freed. That is what I would expect.


Alan.
WF 7.705/8.007
May 19, 2013, 10:01 AM
John_Edwards
So . . . when you say "procedure" you're saying the entire run of the Maintain form has to end prior to the implicit commit occurring?

J.



May 19, 2013, 11:54 AM
Alan B
Basically by 'procedure' I mean from MAINTAIN to END. A child procedure adds further steps if it finished with KEEP, transaction open, or DROP, implied COMMIT.


Alan.
WF 7.705/8.007
May 20, 2013, 07:52 AM
Maintain Wizard
I know of no changes to the way Maintain commits data. If you do not issue an explicit commit, the changes are made at the time of the END statement or when the application ends. There MAY be some subtle differences with the type of database or interface you are using. But that's more along the lines of record locking than changes to the database.

Mark
May 20, 2013, 08:49 AM
John_Edwards
Alright . . . I'll be honest that sounds counter-intuitive to what I've seen, but I personally always clear issue commit or rollback in any case that moves data, so I don't run into it in my code very often. I have a unit that appears to be committing half its data mid-run (because they did not code their error handling thoroughly and I'm stuck holding the bag this time).

I think I need to revise the entire unit to take the question off of the table.

The coding lesson for Monday, May 20th 2013 is:

"Always flush when you're done."



May 21, 2013, 09:39 AM
John_Edwards
Ok, so . . . just to make sure -- if one Maintain calls another (calls a "business unit") to perform a save, the records written in the called unit are committed when the called unit ends, correct? The commit doesn't defer to the calling Maintain?

J.



May 21, 2013, 10:01 AM
Alan B
As long as the called maintain is called with DROP, not KEEP. A KEEP can leave a transaction uncommitted.


Alan.
WF 7.705/8.007