Hi Alan 

Regarding your second question:-

TableInfo(tablename,TAB_INFO_NROWS) returns number of records including any 
deleted records.

If you select all records in the table then SelectionInfo
(tablename,SEL_INFO_NROWS) will give you only live records. If you therefore 
take the difference between these two records and it is non zero the DAT file 
has not been packed. I expect there is any easier way than this but its a start 
anyway!

If you do not have MapBasic and want to do above within MapInfos MapBasic 
Window then:-

TAB_INFO_NROWS = 8
SEL_INFO_NROWS = 3


Regards

Bob


Quoting Alan Hale <[EMAIL PROTECTED]>:

> This seems to me a very basic problem to which there is probably a
> simple solution - but I confess I can't see what it is. I want to
> programmatically  iterate through a table updating rows on the basis of
> information in each row. My first approach was to use "Fetch" so that
> deleted rows in an unpacked table are skipped over. But then how do I
> identify the rowid? If I use a while loop and a counter, the counter
> will not take account of deleted rows and any updates will end up being
> "staggered". What I think I need is either some way of  identifying the
> current rowid (after a Fetch statement), or a way of identifying if a
> row is deleted. 
> 
> I could of course programmatically pack the table, with a dialog to the
> user to check this is OK. I'd prefer not to take this approach, but if I
> do I have another question - how can I determine programmatically
> whether a table is packed or not?
> 
> Thanks
> 
> 
> 
> Alan Hale
> Lower Plant Ecologist
> Countryside Council for Wales
> Aberystwyth
> 
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Message number: 9954
> 
> 




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 9962

Reply via email to