home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CLIPB52.ZIP / MARTIN.ZIP / EXAMPL01.PRG next >
Encoding:
Text File  |  1989-06-01  |  779 b   |  39 lines

  1. ********************************
  2. * EXAMPL01.PRG                 *
  3. * Written By Gregory A. Martin *
  4. ********************************
  5.  
  6. * This example illustrates the fundementals of opening up databases using
  7. * the G_USE() function.
  8.  
  9. DO Startup
  10.  
  11. * Open the two needed databases
  12. IF .not. G_Use("ARec", "ARec1, ARec2", "Receive", .f., .f.)
  13.   * If unable to open then return
  14.   RETURN
  15. ENDIF
  16. IF .not. G_Use("APay", "APay1, APay2", "Payable", .f., .f.)
  17.   * If unable to open then close first database and return
  18.   SELECT Receive
  19.   USE
  20.   RETURN
  21. ENDIF
  22.  
  23. * ... Get some user input ...
  24.  
  25. SELECT Receive
  26. * ... Do Some Processing ...
  27.  
  28. SELECT Payable
  29. * ... Do Some Processing ...
  30.  
  31. * Close databases and return
  32. SELECT Receive
  33. USE
  34. SELECT Payable
  35. USE
  36. RETURN
  37.  
  38.  
  39.