SQL delete query deletes but does not delete 
Author Message
 SQL delete query deletes but does not delete

Hi,

I'm trying to create a new empty DBaseIV file by copying another file and
then executing a dalete query (Delete From <tablename>) to get rid of the
data.  However, when I try to modify the structure of the 'empty' table I
get an error message that tells me there are records in the table.  The
claim is supported by the size of the file, however if I look at it in
Excel, no records appear.

Anyone knows what is going on?  How can I make my delete query truly delete
all records?

Thank you,

Fabio




Sun, 07 Apr 2002 03:00:00 GMT  
 SQL delete query deletes but does not delete
I'm not a dBase expert but I believe what you are seeing is that when you
delete a record in dBase the record is just flagged as deleted but still
takes up space in the table. I think you have to pack or compact, whatever
you do with dBase, to free the space taken up by the deleted records. Then
they will truly be gone. You won't see these records Excel because it
won't show records flagged as deleted, if you were to open this table in a
FoxPro, etc. you would see the records with the delete flag set.

Good Luck,
Roy

Quote:

> Hi,

> I'm trying to create a new empty DBaseIV file by copying another file and
> then executing a dalete query (Delete From <tablename>) to get rid of the
> data.  However, when I try to modify the structure of the 'empty' table I
> get an error message that tells me there are records in the table.  The
> claim is supported by the size of the file, however if I look at it in
> Excel, no records appear.

> Anyone knows what is going on?  How can I make my delete query truly
delete
> all records?

> Thank you,

> Fabio



--
Posted via CNET Help.com
http://www.help.com/


Mon, 08 Apr 2002 03:00:00 GMT  
 SQL delete query deletes but does not delete
In dBase you must "pack" the database to really delete the records, otherwise,
as you say, they are only flagged for deletion.  But why not just create a new
database during runtime?
Quote:

> I'm not a dBase expert but I believe what you are seeing is that when you
> delete a record in dBase the record is just flagged as deleted but still
> takes up space in the table. I think you have to pack or compact, whatever
> you do with dBase, to free the space taken up by the deleted records. Then
> they will truly be gone. You won't see these records Excel because it
> won't show records flagged as deleted, if you were to open this table in a
> FoxPro, etc. you would see the records with the delete flag set.

> Good Luck,
> Roy


> > Hi,

> > I'm trying to create a new empty DBaseIV file by copying another file and
> > then executing a dalete query (Delete From <tablename>) to get rid of the
> > data.  However, when I try to modify the structure of the 'empty' table I
> > get an error message that tells me there are records in the table.  The
> > claim is supported by the size of the file, however if I look at it in
> > Excel, no records appear.

> > Anyone knows what is going on?  How can I make my delete query truly
> delete
> > all records?

> > Thank you,

> > Fabio


> --
> Posted via CNET Help.com
> http://www.help.com/



Mon, 08 Apr 2002 03:00:00 GMT  
 SQL delete query deletes but does not delete
I figured I had to do so, what I tried was a quick and dirty shortcut.
Since I deal so much with DBase files in this project, and for my personal
curiosity, I would love to know if one can pack a database using SQL.

Thank you all for your help.

Fabio



Tue, 09 Apr 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Checking if a delete will succeed (without doing the delete)

2. Deleting Controls does not delete form reference information

3. To delete or not delete?

4. DELETE is not DELETING?

5. Doing Update/Delete Queries

6. Deleted recordd do not updated to the DB when reconnecting and doing updatebatch

7. rst.delete, with cascade delete???

8. Delete query does not work on second iteration

9. Delete deleted items

10. Deleting mails in deleted folder

11. Programmatically delete Deleted Items folder once a day

12. Delete without going to deleted items folder !

 

 
Powered by phpBB® Forum Software