Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What happens when deleting record from TTable?

Status
Not open for further replies.

hstijnen

Programmer
Nov 13, 2002
172
NL
Hi,

I have a TTable connected with a dBase file (.dbf). I opened the table and went to first record with tMyTable->First(). Now tMyTable->RecNo = 1. Then I delete the first record: tMyTable->Delete().
Close and reopen the table and go to first record.
But now tMyTable->RecNo = 2! In other words, the record is not fysically deleted and RecNo takes deleted records into account.

What must I do to delete the record fysically? (in good old dBase one has the command "Pack")

cheers, Henk
 
DB allocate space for the records and when you delete a record, the space still remains. Depending on the the DB, that space may be used again when you add another record. When you add another record to the table, is it out into the deleted record's space?

I'm not familar with dBase but in other DB's I've used, you can call "pack" if the pack method has been defined for the TDataBase methods.



James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
question

I use primarily paradox tables and have never seen this occur. is this a dbase thingy only?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top