• Requesting help with transaction processing

    From abrayshaw53@gmail.com@21:1/5 to All on Sun Apr 12 05:57:09 2020
    I have been using Clarion since the DOS days, and lately mostly for recreational programming. There's a technique I've never been able to master, and am hoping for some guidance. I am using Clarion 8
    I've created a typical browse procedure for a table - let's call it Table1. In the update procedure for that browse, along with the fields for Table1, I've added a browse list on the update procedure to update records from Table2, which are related to
    Table1 with a relation.
    What I've never been able to master is how to use transaction processing (commit, rollback, etc.) to handle the OK or Cancel possibilities on the update window.
    IOW, if I'm using the update procedure to add child records to Table2, and then click on Cancel, I'd like to rollback the addition of the child records automatically. I know there's an extension template named "Add a transaction manager to the procedure"
    , but there's not much, if any, documentation as to how to use it.
    Can anyone give me some help with this?
    TIA

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean H@21:1/5 to abrayshaw53@gmail.com on Tue Apr 14 10:38:09 2020
    On 12/4/20 10:57 pm, abrayshaw53@gmail.com wrote:
    I have been using Clarion since the DOS days, and lately mostly for recreational programming. There's a technique I've never been able to master, and am hoping for some guidance. I am using Clarion 8
    I've created a typical browse procedure for a table - let's call it Table1. In the update procedure for that browse, along with the fields for Table1, I've added a browse list on the update procedure to update records from Table2, which are related to
    Table1 with a relation.
    What I've never been able to master is how to use transaction processing (commit, rollback, etc.) to handle the OK or Cancel possibilities on the update window.
    IOW, if I'm using the update procedure to add child records to Table2, and then click on Cancel, I'd like to rollback the addition of the child records automatically. I know there's an extension template named "Add a transaction manager to the
    procedure", but there's not much, if any, documentation as to how to use it.
    Can anyone give me some help with this?
    TIA


    Someone posted a method of doing this on clarionhub.com several months back.

    For your invoice-type problem there are a number of solutions.
    But the technique you ask about requires a logout as you enter the form procedure and a rollback/commit at the end.

    Note that there are problems with this if you're in a multi use
    situation. Logout will either lock the TPS files or have an open
    transaction in SQL, both of which may stop others from working.


    Sean H

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)