Hi Alan

You do not need to worry if there are deleted records or if the table is packed.

If in your loop you get the table.rowid and run your update for rowid = the 
value


ie

dim lnRow as integer

....


do while....

     lnRow = table.rowid

     update table....... where rowid = lnRow


loop

When a record is deleted even if the table is not packed a loop as above cannot 
retrieve the deleted records therefore you do not need to worry about it.


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: 9961

Reply via email to