Uffe,

This is almost a stuff but surely it will work.

When you open the table you can load an  array with the code that identify
each record (the unique key).
The index array  will be the ID record.
If the table is ROnly you have no problems. If you can modify it, when you
add / change the key you must to maintein the array. If you delete a record
there is no problem, because the IDs don't change until you make a pack.
When you want to know which is the original ID for a Selection record you
only must to do a Binary Search (or similar) in the array  to identify the
key. The index is the original ID.
Remember to use a Binary Search the array must be ordered.

May be this is a junk, but probably be usefull to solve your problem. -:)

Alejandro
Argentina


----- Original Message -----
From: Uffe Kousgaard <[EMAIL PROTECTED]>
To: Mapinfo-L <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 9:24 AM
Subject: MI-L: Getting RowID from selection


> Hi
>
> I am trying to get RowID from a selection, but are stuck at the moment
with
> this pseudo-code:
>
> select * from mytable where obj partly within MyBuffer into tmptable
> loop through tmptable: print rowID's of records selected in original table
>
> How can this be accomplished? I'm ready to do all kinds of weird stuff as
> long as I don't have to add a field to MyTable with rowid.
>
>
> Kind regards
>
> Uffe Kousgaard
> www.routeware.dk
>
>
>
>
>
> _______________________________________________________________________
> 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