Re: FILEMAN.E

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Brian Jackson,

More on common xbase commands.

Arlie Codina
web.master at flashmail.com

                *** XBase Common Data Manipulation Commands ***

DELETE - deletes/mark records from the current table.

Syntax
DELETE
[<scope>]
[FOR <condition 1>]
[WHILE <condition 2>]

<scope>
FOR <condition 1>
WHILE <condition 2>

The scope of the command. The default scope is NEXT 1, the current
record only.

DBF tables support the concept of soft deletes, where the record is
marked as deleted and normally hidden when SET DELETED is ON
(the default). If you SET DELETED OFF, you can see the deleted
records along with the records that are not marked as deleted. You
can RECALL the record to undelete it. To actually remove the record
from the table, you must PACK the table. If you use the LIST or
DISPLAY commands to display records, records marked as deleted are
displayed with an asterisk.

PACK - removes all records from a DBF table that have been marked
       as deleted.

SET DELETED - controls whether dBASE hides records marked as deleted
in a DBF table.

Syntax
SET DELETED ON | off

Description

Use SET DELETED to include or exclude records marked as deleted
in a DBF table. When SET DELETED is OFF, all records appear in a
table. When SET DELETED is ON, dBASE excludes records that have
been marked as deleted, hiding them from most operations.
INDEX, REINDEX, and RECCOUNT() aren't affected by SET DELETED.
If two tables are related with SET RELATION, SET DELETED ON
suppresses the display of deleted records in the child table.
The related record in the parent table still appears, however,
unless the parent record is also deleted.

RECALL - restores records that were previously marked as deleted
         in the current DBF table.

Syntax
RECALL
[<scope>]
[FOR <condition 1>]
[WHILE <condition 2>]

<scope>
FOR <condition 1>
WHILE <condition 2>

The scope of the command. The default scope is NEXT 1, the
current record only.

Description

Use RECALL to undelete records that have been marked as deleted
in the current DBF table with DELETE but have not yet been removed
with PACK. Executing DELETE marks the record as deleted but doesn=92t
physically remove them from the table. If SET DELETED is ON
(the default), these deleted records cannot be seen. RECALL reverses
this process, unmarking the records and fully restoring them to the
table.

Records eliminated with PACK or ZAP are permanently removed and can't
be recovered using RECALL.

When using RECALL, SET DELETED should be OFF; otherwise you will not
be able to see the deleted records you want to recall. Using RECALL
on records that are not marked as deleted has no effect.

ZAP - removes all records from the current table.

Syntax
ZAP

Description
ZAP is the fastest way to delete all records from a table. DELETE
ALL, followed by PACK, also deletes all records from a table.
Using ZAP requires a table be opened exclusively.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu