home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Product / Product.zip / viper092.zip / DESTRYDB.CMD < prev    next >
OS/2 REXX Batch file  |  1995-09-20  |  786b  |  26 lines

  1. /*      VIPER Database Engine
  2.         Destroy a database example.
  3.         Copyright (c) - 1995 by Douglas A. Bebber
  4. */
  5.  
  6.  
  7. /* Register the VIPER Database Engine functions... */
  8. rc = RxFuncAdd("SysLoadViperFuncs","Viper", "SysLoadViperFuncs")
  9. call SysLoadViperFuncs
  10.  
  11. /* FIRST CREATE THE DATABASE TO BE DESTROYED (COPY AN EXISTING DATABASE) */
  12. status = RxViperCopyDatabase("CUSTOMER", "CUSTBKP", "LNAME", '0')
  13. if status = 0 then
  14.         say 'Failed to copy CUSTOMER database to CUSTBKP database!'
  15. else
  16.         say 'Successfully copied CUSTOMER database to CUSTBKP database!'
  17.  
  18. status = RxViperDestroyDatabase( 'CUSTBKP')
  19. if status = 0 then
  20.         say 'Failed to destroy the CUSTBKP database!'
  21. else
  22.         say 'Destroyed the CUSTBKP database!'
  23.  
  24. call SysDropFuncs
  25.  
  26.