Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delete All Records

114 views
Skip to first unread message

Tim on VisionTech

unread,
Nov 1, 2000, 11:58:20 PM11/1/00
to
I have C5Web edition app that allows users to paste text from another
program into a memo field in sequential records in a TPS file.

Each work session consists of 'capturing' about 20 - 25 paragraphs of text.
Each cut and paste becomes a record in the TPS file.

All the program really does is print the records out, 3 up, on an 8.5 x 11
page...dynamically filling the page, putting as many as will fit in each of
the three columns....the size of each record's memo field varies radically
and the report writer manages to print several sheets of paper all nicely
arranged with the maxium # of records per page.

Anyway, I haven't done any hand coding, and I need a simple button that will
use some embedded source code to "Delete All Records" at the end of each
daily session.

1) If the button appears in on the browse view, is this possible?
2) If not in the browse view, then I'll place it on the drop down menu....
3) Is there a simple line or two of code I can embed to delete all the
records?

Thanks,

Tim


Ben E. Brady

unread,
Nov 2, 2000, 1:22:50 AM11/2/00
to
Yes, ERASE the file prior to initializing the procedure and let the program
recreate the file. Fastest way to do it.

Ben E. Brady
Brady & Associates, LLC.

"Tim on VisionTech" <t...@visiontechllc.net> wrote in message
news:Ht6M5.6998$KH3....@news3.atl...

Zoran Bujandric

unread,
Nov 2, 2000, 4:12:39 AM11/2/00
to
Hi Tim!

Use Clarion REMOVE command in your procedure, before starting the
processing needed. It erases all records from the file.

Clarion online Help:
**********************
REMOVE(_file_)

REMOVE Deletes a FILE.

_file_ The label of the FILE to be removed, or a string constant or
variable containing the filename of the file to erase.

The REMOVE statement erases a file specification from the operating
system directory in the same manner as the DOS "Delete" command. The
file must be closed, or the "File Already Open" error is posted. If any
error is posted, the file is not removed.
Since some file drivers use multiple physical disk files for one logical
FILE structure, the default filename and extension assumptions are
dependent on the file driver. If any error is posted, the file is not
deleted.

Errors Posted: 02 File Not Found
05 Access Denied
52 File Already Open

Example:

REMOVE(OldFile) !Delete the old file
REMOVE('Changes.dat') !Delete the changes file

***********************************
You'll have to open the file exclusively to be able REMOVE it.

HTH

Zoran


Chet Sapino

unread,
Nov 2, 2000, 1:22:59 PM11/2/00
to
Tim:

Code to delete all records in a file/table, where File is the name of your
file, is:

Lock(File)
Empty(File)
Unlock(File)
This Window.Reset(True)

Put it in a button Accept Embed on your Browse.

Regards,
Chet Sapino

"Tim on VisionTech" <t...@visiontechllc.net> wrote in message
news:Ht6M5.6998$KH3....@news3.atl...

Tony York

unread,
Nov 5, 2000, 3:00:00 AM11/5/00
to
Hi Zoran,

I thought you could just CREATE the file again, and it would delete all
of the records.

Regards

Tony

vcard.vcf
0 new messages