Options

object blocked when many users are running

txerifftxeriff Member Posts: 492
Hi,

I wonder if you can help me.

Lets say you have a temporary table, common to many reports, forms/pages.... and its used with userid and reportid to fill the proper date before being reported.

When a user its using it, the next one gets an error saying its in use.

Is it any way to fix this?

lets say you have a loop like this:

repeat

worktable.init:
worktable.field1:='whatever';
worktable.field2:='whatever 2';
worktable.insert;
until t37.next=0

then the worktable is filtered in the dataitem and values of field1 and field2 are shown.

if I do a t37.FINDSET(FALSE,FALSE), would that help? could it be the problem in here?


any ideas?

thanks.

:wink::wink:

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Define your record-variable as Temporary. Temporary tables are kept in memory on the client PC so there is no locking involved.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    txerifftxeriff Member Posts: 492
    Define your record-variable as Temporary. Temporary tables are kept in memory on the client PC so there is no locking involved.


    but if you insert the records on a nav temporary table, those records dont go anywhere right? they are not inserted in the table after doing any commit.

    Could I set those records to a dataitem into a predataitem maybe?
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    txerifftxeriff Member Posts: 492


    thanks, that will be very usefull

    edit:

    I see a small problem.

    I need to link by properties the temporary table to another dataitem up (lets say sales lines with table T337). I cant do that if I use an integer dataitem....
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Then set the link through code instead of using the properties, like: tmpReservEntry.SETRANGE("Item No.","Sales Line"."No.");
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    txerifftxeriff Member Posts: 492
    Then set the link through code instead of using the properties, like: tmpReservEntry.SETRANGE("Item No.","Sales Line"."No.");


    ok thnks, i will try it. thanks a lot again!
Sign In or Register to comment.