Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record is in use by another user
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00659506
Message ID:
00660867
Views:
16
>OK, just some thoughts. I throw them over to You and maybe one of them accidentaly hits the target
>
>
>I'm not sure, I can do with this "Live" version and we never were able
>to reproduce this problem on Development ...

>
>Is the database on the live-system OK? Indices no corrupt indices?
>
>Sometimes the error message pops up immediatelly after they click on the textbox in the grid
>
>Is it the AfterRowColChange-Event? if so, Do You get the error at the "replace..." or the
>".RequeryGridSources()"
>
>I don't know if this is still valid (and if this would make a differnece at all) but I rember
>"Lockscreen" to be kind of additive. In some cases You will have two .Lockscreen=.T. in a row
>but only one .Lockscreen=.F.
>
>Maybe You can put the lockscreen-pair one level down (underneath the if this.nCurRec<>m.lnRecno) so that they do not fire if you simply change columns.
>
>You are moving the record-Pointer within the AfterRowColChange, I'm not sure if this is not causing
>another AfterRowColChange
>
>Are You sure, You're not addressing a record in another datasession?
>
>Did You try something like this
>
>
>    if ! LockR()
>      wait window "Oooops..."
>    else
>      replace (.AddrField) with '6', ModiType with 'C'
>      unlock
>    endif
>
>
>
>where lockR is a construction like that
>
>
>
>PROCEDURE LockR
>lparameters    tc_Alias
>LOCAL ln_WasRepro, ln_INKey
>
>ln_WasRepro = set("REPROCESS")
>tc_Alias    = iif(empty(tc_Alias), alias(), tc_Alias)
>
>set REPROCESS to 1
>*-- can I lock this directly?
>if rlock(tc_Alias)
>    set REPROCESS to (ln_WasRepro)
>    return .T.
>endif
>
>*-- Can't lock immediately
>*-- so try for a moment
>clear typeahead
>ln_Inkey = inkey(1)
>
>*-- Schleife bis entweder ESC oder Sperrung
>do while ln_Inkey <> 27 and not rlock(tc_Alias)
>    ln_Inkey = inkey(1)
>enddo
>
>set REPROCESS to (ln_WasRepro)
>return ln_Inkey <> 27
>
>*-- or like this
>*--
>*-- ll_ok = .F.
>*-- for ln_i = 1 to 10
>*-- if rlock(tc_Alias)
>*--    ll_ok = .T.
>*--    exit
>*-- endif
>*-- set REPROCESS to (ln_WasRepro)
>*-- return ll_OK
>
>
>
>
>You are moving the pointer and addressing the fields always
>with the IN - clause but You do the REPLACE without selecting
>the alias or using IN there. You should be on the right alias
>as You are in the grid, but still I would make sure.
>
>In this particular application users work with buffered table directly
>where and when does the saving take place? - On the other hand, I don't think
>that makes a difference here.
>
>
>This is for the first impressions, I'll see if more rubbish comes to my mind

Thanks a lot for the comments, Frank. I'm going to re-think some of the code. In the meanwhile my colleague and I were able to isolate the problem's source.

See Record is in use - FOUND IT! Thread #660857 Message #660857 for our "discovery".
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform