home bbs files messages ]

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,411 of 9,834   
   Kenneth to All   
   Unlocking problem...   
   04 Apr 07 10:30:17   
   
   From: usenet@soleSPAMLESSassociates.com   
      
   Howdy,   
      
   Originally, I had code on a form to enter today() in a field   
   called ModDate when something in the underlying tables was   
   modified using the form. That code looked like this, and   
   worked fine:   
      
   	;// This code executes only for the form:   
      
     if eventInfo.id() = DataPostRecord or   
   	  (eventInfo.id() = DataUnlockRecord and   
   		active.RecordStatus("Modified"))   
   	  then	   
   	 ModDate.value = today()   
     endIf   
      
      
      
   I then added a date field to an underlying table that was to   
   update to today() whenever the form was used to view that   
   record (whether or not anything was modified.) That field is   
   called ViewedOn and I modified the code above as follows:   
      
   // 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   
      
      
      
   That seems simple enough, but I am having an unanticipated   
   problem:   
      
   For most records, it looks fine, but when certain other code   
   fires on the form, I get the error that the record is   
   already locked for this session.   
      
   How can I correct this?   
      
   Very sincere thanks,   
      
   --   
   Kenneth   
      
   If you email... Please remove the "SPAMLESS."   
      
   --- 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