temporary tables locking to death?

wicwic Member Posts: 96
edited 2019-03-04 in NAV Three Tier
hi all,
I'm wondering why 2 users can have locks on temporary tables.
Example: I use a report processingOnly.
DataItem is Item (T27)
Create a TEMP Glob/Var on ItemLedgerEntry
OnAfterGetRec : insert an itemLedgerEntry for each item. (just for tests reason, don't look for any logic behind)

Run the report concurrently with 2 different users. You'll get a Table Lock problem. How is this possible? Temporary is running in Memory in 2 different instances. I don't understand.
Thanks for tips!

Regards
Chris
#### Only one can survive ######

Answers

  • Developer101Developer101 Member Posts: 535
    shouldnt be . tested in case. try again.
    United Kingdom
  • Developer101Developer101 Member Posts: 535
    make sure temporary property is set to Yes for the table in question
    United Kingdom
  • lubostlubost Member Posts: 623
    Locking and deadlocking are two different things. What your code looks like? What your report transaction type?
  • Developer101Developer101 Member Posts: 535
    updatenolock
    United Kingdom
  • Developer101Developer101 Member Posts: 535
    point is temporary tables are manipulated independently per instance
    United Kingdom
  • wicwic Member Posts: 96
    @lubost: what do you mean by "What your report transaction type?"
    @Developer101 : Yes Var is set as temporary, that's exactly why I don't understand my locking problem- temp tables should be manipulated independently per instance but my locking errors proves the opposite.
    #### Only one can survive ######
  • krikikriki Member, Moderator Posts: 9,112
    Could you post your code, so we can see what it does?
    I would be very surprised that temptable inserting locks records.
    I think more that you have missed something in your code.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.