SearchSearch   ProfileProfile   Log inLog in   RegisterRegister 

Deleting Old User records permanently

 
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum
View previous topic :: View next topic  
Author Message
jeremybolduc



Joined: 23 Jun 2006
Posts: 11
Location: Oxford Airport

PostPosted: Fri Sep 15, 2006 4:49 pm    
Post subject: Deleting Old User records permanently

Hi again,
I've been using MSQRY32 to look at the backend of fsusr (since I gave up with mysql) and I can see ALL records in there including the records marked as deleted. Is there a way/script to purge the "deleted" accounts?
I am running 4.0.9 and downloaded 4.12 and copied over the resetABW utility but it seems abit hit and miss on some records. If I can at least clear out the old records I can see which accounts are causing me greif and trouble shoot that way.
_________________
jeremy a bolduc
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Mon Sep 18, 2006 3:21 am    
Post subject:

This is a "feature" for dbase (dbf) datasource. I am not aware of any reliable way to purge the deleted records other than a new record should replace a deleted record. Also, A LOT of the dbase tools will corrupt the index so I definitely not recommend you to try to tinker with them.

Note that this should not affect your database operation at all other than it will waste a bit of space.
_________________
~ Patronsoft Limited ~
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Mon Sep 18, 2006 3:23 am    
Post subject:

Also, if you suspect your dbase table is corrupted, please check out http://www.patronsoft.com/forum/viewtopic.php?p=4938#4938 for steps to rebuild the database.
_________________
~ Patronsoft Limited ~
Back to top
bradr



Joined: 27 Oct 2006
Posts: 1
Location: Reno, Nevada

PostPosted: Fri Oct 27, 2006 11:33 pm    
Post subject:

Alan - you are kidding, right? I'm seriously troubled by the naive answer you gave, especially since I plunked down a pile of cash for FirstSpot and it has a lot more bugs than I would expect.

You are 100% correct in that the dbf file structure has no inherent mechanism for purging and compacting a deleted record. However, the same is true of many databases.

The workaround is not an issue of the database choice, it is an issue of proper programming technique. You simply add a field to each record that acts as a flag for logical deletions. If the user is deleted, flag the record that way and then make your software ignore all flagged records. And then provide a utility to compact the database manually by copying only non-flagged records to a new file, delete the old one, then rename.
_________________
Brad
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Sat Oct 28, 2006 4:05 am    
Post subject:

While it may be true that other database may not purge/compact the database (mostly due to performance reason), it is easier to open dbf datafiles directly and cause confusion to users. (E.g. it is more difficult to open Oracle datafiles directly, so it is harder to access the purged records.)

A slightly simpler method inspired by your algorithm is to just overwrite the record before deletion. This way it will solve the purge problem (but it still won't compact the database). Anyway, we consider this issue seriously in the future version. Thanks for the heads-up.
_________________
~ Patronsoft Limited ~
Back to top
Display posts from previous:   
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group