Is this a bug?

Kem Tekinay ktekinay at mactechnologies.com
Sun Oct 22 15:54:15 CDT 2006


Consider this code to convert a FK link to a Binary link:

    err = me.Results.FirstRecord
    while not me.Results.EOF
      resultsID = me.Results.RecID
      arr( 1 ) = resultsID
      
      v = me.Results.CandidateID.Value
      cid = me.Candidate.CandidateID.FindSingleValue( v )
      
      v = me.Results.RaceCountyID.GetString
      rid = me.Race.RaceCountyID.FindSingleValue( v )
      
      if cid <> 0 then
        arr( 0 ) = cid
        me.CandidateResultsBLink.LinkRecords( arr )
      end if
      
      if rid <> 0 then
        arr( 0 ) = rid
        me.RaceResultsBLink.LinkRecords( arr )
      end if
      
      me.Results.RecID = resultsID // <<--- This is necessary, but why?
      err = me.Results.NextRecord
    wend

If I do not put in ³me.Results.RecID = resultsID², this routine jumps
through the Results table by leaps and bounds. In other words, during the
first pass, resultsID is 1, the second pass it is 9, the third pass 17, and
so on. But why should it change during this loop?

__________________________________________________________________________
Kem Tekinay                                                 (212) 201-1465
MacTechnologies Consulting                              Fax (914) 242-7294
http://www.mactechnologies.com                        Pager (917) 491-5546

  To join the MacTechnologies Consulting mailing list, send an e-mail to:
           mactechnologies_consulting-subscribe at yahoogroups.com









More information about the Valentina mailing list