home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Product
/
Product.zip
/
viper092.zip
/
DELREC.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-20
|
1KB
|
46 lines
/* VIPER Database Engine
Delete a database record example.
Copyright (c) - 1995 by Douglas A. Bebber
*/
/* Register the VIPER Database Engine functions... */
rc = RxFuncAdd("SysLoadViperFuncs","Viper", "SysLoadViperFuncs")
call SysLoadViperFuncs
/* OPEN THE DATABASE */
status = RxViperOpenDatabase('CUSTOMER')
if status = 0 then
Do
say 'Failed to open CUSTOMER database!'
exit
End
else
say 'Successfully opened CUSTOMER database!'
/* MOVE TO FIRST RECORD */
status = RxViperMoveToFirstRecord('CUSTOMER', 'LNAME')
say 'Moving to first record in the database...'
/* DELETE THE RECORD */
status = RxViperDeleteRecord('CUSTOMER', 'LNAME')
if status = 0 then
say 'Failed to delete the database record!'
else
say 'Successfully deleted the database record!'
/* CLOSE THE DATABASE */
status = RxViperCloseDatabase('CUSTOMER')
if status = 0 then
Do
say 'Failed to close CUSTOMER database!'
exit
End
else
say 'Successfully closed CUSTOMER database!'