[V4RB2] FindValue stops at 1,022 records

Kem Tekinay ktekinay at mactechnologies.com
Wed Apr 20 03:36:31 CDT 2005


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

__________________________________________________________________________
Kem Tekinay                                                 (212) 201-1465
MacTechnologies Consulting                              Fax (914) 242-7294
545 Eighth Avenue, Suite 401                          Pager (917) 491-5546
New York, New York 10018                    http://www.mactechnologies.com

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