Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.paradox    |    To crash or not to crash, asks Borland    |    9,834 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 8,419 of 9,834    |
|    Liz McGuire to Kenneth    |
|    Re: Unlocking problem...    |
|    04 Apr 07 11:05:39    |
   
   From: liz@paradoxcommunity.com   
      
   Try this:   
      
   1. Put the stuff in the action event in a switch - only one action   
   happens at a time, but if you use if blocks, they are all checked - use   
   a switch.   
      
   2. In the second bunch, do this   
      
   case eventInfo.id() = DataArriveRecord :   
    if not isEdit() then   
    edit()   
    endIf   
    doDefault ;// **   
    ViewedOn.value = today()   
    ViewedOn.unlockRecord() ;// ***   
      
      
   ** I rarely recommend this, but it seems the best option in this   
   situation. This may well fix the problem entirely - you're probably   
   trying to write to the field before the arrive is complete enough to   
   allow it and it's probably another record that's already locked...   
      
   *** Unless the ViewedOn field is part of the current index and/or   
   there's a validity check that hasn't been met, this should be fine. If   
   it's part of the current index, try dropping this line and see what   
   happens. If there are validity checks which might not have been met   
   yet, then you'll have to decide what to do - try without this line, put   
   it in a try block and in the onFail you can either do errorClear() (the   
   record stays locked) or something else (post, pop an error, cancel your   
   edit, whatever - it depends on your needs).   
      
   Liz   
      
      
   Kenneth wrote:   
   >   
   > ;// This code executes only for the form:   
   >   
   > if eventInfo.id() = DataPostRecord or   
   > (eventInfo.id() = DataUnlockRecord and   
   > active.RecordStatus("Modified"))   
   > then    
   > ModDate.value = today()   
   > endIf   
   >   
   > ;// following added:   
   >   
   > if eventInfo.id() = DataArriveRecord then   
   > ViewedOn.value = today()   
   > endIf   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca