Is this a bug?
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Oct 23 01:42:59 CDT 2006
On 22.10.2006 22:54, "Kem Tekinay" <ktekinay at mactechnologies.com> wrote:
> 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?
Hi Kem,
On first look mistake is that you mix EOF and NextRecord.
EOF should be used with NextRecordODBC.
Better use loop
do
while Results.NextRecord
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list