[V4RB2] FindValue stops at 1,022 records

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Apr 20 10:57:50 CDT 2005


On 4/20/05 10:36 AM, "Kem Tekinay" <ktekinay at mactechnologies.com> wrote:

> Here is an odd one. I'm writing a program that logs into an e-mail account,
> downloads messages and stores them in a database. To keep duplicates out, it
> first downloads the headers, then uses the Message-ID header to see if the
> message has already been entered.
> 
> The code is this:
> 
>   hdrs = email.Headers
>   if hdrs <> nil then
>     if hdrs.NameCount( "Message-ID" ) > 0 then
>       msgID = hdrs.Value( "Message-ID", 0 )
>       if msgID <> "" then
>         bs = tblEmail.fldMessageID.FindValueAsArraySet( msgID )
>         if bs <> nil and bs.Count > 0 then
>           iter = bs.MakeNewIterator
>           emailID = iter.FirstItem
>           iter = nil

Quick note:

    you always extract from ArraySet only first Item ?
    then you can use FindSingle() function.
    Do the same, but will be less code.


>           bs = nil
>         end if
>       end if
>     end if
>   end if 
>   bs = nil
>   
>   return emailID // A zero here means the e-mail is unique
> 
> The problem is, once the database gets to 1,022 records, bs.Count returns
> 1,022. I've tried trashing the database and starting the downloads from
> 1,023 and 2,044. No matter what, once I get 1,022 records, FindValue and
> FindValueAsArraySet stop working correctly.

-- 
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