Navigation:  Reference > Commands >

Delete Record

Print this Topic Previous pageReturn to chapter overviewNext page

 

Delete an active record for a specific TAS Professional file.

 

 

DEL file_num/'FILENAME' Required - The number/handle of the file that contains the record to be deleted.

NOCNF If this option is included in the command, the record is deleted without asking for confirmation from the user.  The default action is to ask before deleting the record.  This would be useful when you're deleting records from multiple files and want to ask the Delete question only once.

 

GOTO label If the user answers N to the Delete question (NOCNF is not included), you can put a line label here signifying where the program should transfer control.  If this is not specified the program will continue with the next line.

 

ERR labelIf you specify a label here the program will transfer control to the appropriate line if an error occurs during the command.  If you don't put a label here and an error occurs it will be displayed on the screen for the user and processing will continue with the next line in the program.  If you don't want an error to be displayed then specify NO_ERR as the error_label, for example:

 

               ... ERR NO_ERR ...        //no quotes surround the NO_ERR specifier

 

       NOTE:  If an error occurs during the DEL command you can test for it with the FLERR() function.

 

 

COMMENTS

This command will only work with regular TAS Professional files (Pervasive/Btrieve and CodeBase).  Also, the record to be deleted must be active.  This means that it cannot have been cleared either through the CLR (Clear File Buffer) command or SAVE command.

 

EXAMPLE

DEL @bkarcust_hndl nocnf //This will delete the current active record and will not ask if it is ok.

 

or if you are using the open command

 

DEL 'BKARCUST' nocnf     // Use this if your are using an open

or

DEL @bkarcust_hndl nocnf // Use this if your are using an openv

 

SEE ALSO

DALL Stringlist()

 

 


Page url: http://www.cassoftware.com/tas/manual/deleterecord.htm