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,188 of 9,834   
   Liz McGuire to Craig   
   Re: SetGenFiltered TCursor and movetoRec   
   17 Feb 07 18:44:42   
   
   From: liz@paradoxcommunity.com   
      
   I'm not sure, but it's possible the record numbers aren't sequential   
   when you set a filter (unlike a range or unfiltered/unranged table).   
   Probably, you have to do a while true loop or just increment the count*   
   var and use nextRecord - either way, quit when you reach liCount-1.   
      
   *assumes nRecords() works right on a filter, I'm not sure.   
      
   If there were an index on HospitalNumber, so you could set a range, your   
   code would work by replacing the filter with a range.   
      
   Liz   
      
      
   Craig wrote:   
   > In the following code snippet, the TCursor dosen't move to the next record   
   > which is record lio+1   
   > The code steps through the line with the errorshow, but it doesn't show the   
   > error..   
   > This is part of a Scan Loop with a different TCursor (P10)   
   >   
   > Thanks in advance.   
   > Craig   
   >   
   >    
   >      dyn["HospitalNumber"] = stNewMR   
   >       tcBounce1.setGenFilter(dyn)   
   >       licount = TCBounce1.nrecords()   
   >   
   >       If licount <2 then;// if less than 2 records nothing to compare..move   
   > on to next patient   
   >         Loop   
   >      ENDIF   
   >   
   >       For lio from 1 to liCount-1   
   >       TCBounce1.movetoRecord(lio)   
   >        dtDCDatetime   = TCBounce1."DCdateTime"   
   >        If not TCBounce1.movetoRecord(lio+1) then ;// <---this does not   
   > happen!!!!   
   >          errorshow("Could not move to record "+STrval(lio +1));// <-- the   
   > errorshow show doesn't show   
   >          return   
   >       Else   
   >        dtAdmitDateTime = TCBounce1."AdmitDateTime"   
   >        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