11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DELETE<br />

Syntax<br />

DELETE [file.var,] record.ID.expr [ON ERROR statements]<br />

Description<br />

The <strong>UniBasic</strong> DELETE command deletes a record from a UniData file. In addition,<br />

the DELETE command releases any locks on the record that have been set by<br />

previous commands.<br />

Note: The DELETEU command also deletes a record, but it does not release locks.<br />

This is the only difference between DELETE and DELETEU statements.<br />

<strong>UniBasic</strong> locks are advisory only. For more information,see Developing <strong>UniBasic</strong><br />

Applications.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

file.var Specifies the file from which to delete the record.<br />

If you do not specify a file.var, UniData reads from the default<br />

file. If no default file is open, a fatal DELETE error occurs.<br />

A default file is one for which no file variable is assigned in the<br />

OPEN statement.<br />

record.ID.expr Specifies the record to delete.<br />

ON ERROR statements Specifies <strong>UniBasic</strong> statements to execute if the DELETE<br />

statement fails because UniData cannot find the file, or a<br />

default file is not open. If you do not specify the ON ERROR<br />

clause, the program terminates.<br />

DELETE Parameters<br />

DELETE 1-202

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!