Cameron wrote:

"BTW, I can't use the select and the use CommandInfo to get teh rowid,
because sometimes rows have been deleted. The CommandInfo function
always seems to not know this and if the selection has deleted rows
above it, they don't get counted."

If some rows have been deleted from a table and the table has not been
packed, the rowids of the remaining objects have not changed, even if some
rowids will correspond to "empty" records. The commandinfo(2) will give the
"original" rowid of the selected object (or of the first object in the table
order of all selected objects). After packing, rowids will be updated to
eliminate the "empty" records.

The question is how to interpret your "... if the selection has deleted rows
above it, they don't get counted"

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapInfo/MapBasic support  http://www.paris-pc-gis.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Cameron
Crum
Sent: September 18, 2001 20:00
To: [EMAIL PROTECTED]
Subject: MI-L Fetch



Is there such a thing as fetching records too fast? I am using a loop to
run through a table. I am trying something like this:

find_id = site100
nbr_recs = TableInfo(Sectors, 8)
For I = 1 to nbr_recs
    Fetch Rec I from Sectors
    s_id = Sectors.ID
    If s_id = find_id then
        do something
    End if
Next

Every time I get to record 2 I get a message Unknown Error. When the if
condition = trrue and it takes a minute to process something, there is
no problem, but if it jsut loops through and the if condition is not
true I get the error. It seems the delay in the processing lets the
program "catch up". Has anyone else experienced this?

BTW, I can't use the select and the use CommandInfo to get teh rowid,
because sometimes rows have been deleted. The CommandInfo function
always seems to not know this and if the selection has deleted rows
above it, they don't get counted.

Cameron



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to