Multi user design gaffe

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RG

    #1

    Multi user design gaffe

    Wondering if anyone can suggest a solution to my dilemma. (VB6, ADO,
    Access 200).

    The situation: Because I had pre-existing data inquiry modules that
    relied on database records, as well as a complex central data entry
    form that uses a recordset with a number of underlying tables, I
    decided to implement the form's cancel function via transaction
    rollback. Probably not a great idea, but it worked well. Until of
    course the client decided he wanted to expand to a multi-user setup.

    I can't use optimistic locking because of the transaction context, and
    record-level pessimistic locking is very problematic because of
    contention for the many related tables.

    I've implemented my own lock table based on the central table's unique
    id, but don't seem to be able to tell the Jet engine NOT to lock the
    records fetched. Are there any obvious solutions other than a fairly
    complete overhaul?

  • david epsom dot com dot au

    #2
    Re: Multi user design gaffe

    > form that uses a recordset with a number of underlying tables
    [color=blue]
    > don't seem to be able to tell the Jet engine NOT to lock the
    > records fetched.[/color]

    Use a make table query to create a local table matching the recordset.

    Use the local table instead of the recordset.

    Just use the original query to load the local table,
    and update back from the local table to the multi-user tables.

    One extra local table, and a couple of lines of extra code
    where selecting and saving the records.

    (david)


    "RG" <rgutter@gmail. com> wrote in message
    news:1138578095 .954287.185450@ g47g2000cwa.goo glegroups.com.. .[color=blue]
    > Wondering if anyone can suggest a solution to my dilemma. (VB6, ADO,
    > Access 200).
    >
    > The situation: Because I had pre-existing data inquiry modules that
    > relied on database records, as well as a complex central data entry
    > form that uses a recordset with a number of underlying tables, I
    > decided to implement the form's cancel function via transaction
    > rollback. Probably not a great idea, but it worked well. Until of
    > course the client decided he wanted to expand to a multi-user setup.
    >
    > I can't use optimistic locking because of the transaction context, and
    > record-level pessimistic locking is very problematic because of
    > contention for the many related tables.
    >
    > I've implemented my own lock table based on the central table's unique
    > id, but don't seem to be able to tell the Jet engine NOT to lock the
    > records fetched. Are there any obvious solutions other than a fairly
    > complete overhaul?
    >[/color]


    Comment

    • RG

      #3
      Re: Multi user design gaffe

      David, thanks for the advice. It suggests I can (indeed, have to) get
      rid of the transaction calls and implement optimistic locking, with or
      without maintaining the existing custom locking. Does that seem right
      to you?

      Comment

      • Guest's Avatar

        #4
        Re: Multi user design gaffe

        I'm not sure exactly what you have in place, except that the
        transaction was locking all the related data tables, which
        is a problem in a multi-user environment.

        I thought that you might be able to leave the transactions in
        place, but they would be against your local temp table.

        Then after all the processing, you could update from your
        local temp table to your shared table.

        Using your custom locking to lock the actual target table.

        Hopefully without much change at all. to your existing code.

        If you can't do it without a major rewrite, then I guess you
        should look for a 'best' solution rather than an 'easiest' solution

        (david)


        "RG" <rgutter@gmail. com> wrote in message
        news:1138670173 .698764.324240@ g47g2000cwa.goo glegroups.com.. .[color=blue]
        > David, thanks for the advice. It suggests I can (indeed, have to) get
        > rid of the transaction calls and implement optimistic locking, with or
        > without maintaining the existing custom locking. Does that seem right
        > to you?
        >[/color]


        Comment

        • RG

          #5
          Re: Multi user design gaffe

          Actually, you're right again - I wasn't thinking about applying the
          transactions to a new connection for the local table, but that will
          allow me to keep most of the existing code in place. Many thanks.

          Comment

          Working...