Alan A follow up on that second question. As said TableInfo(tabname,8) will give you number of records including deletions. For SelectionInfo(3) to give you live records the Select must have a where clause. eg select * from tabname where rowid > 0. Then SelectionInfo will give you the number of live records.
If you do the selection without a where clause ( ie Select * from tabname ) then the SelectionInfo(3) will return number including deletions. Cheers, 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: 9963
