home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP16.EXE / CHP1607.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  890 b   |  38 lines

  1. /*
  2.    Listing 16.7  Replace statement lock
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. #include "INKEY.CH"
  12.  
  13. function upd_cust(cId_code)
  14. LOCAL mname,mcontact
  15. memvar getlist
  16. use CUSTOMER shared new
  17. if ! neterr()
  18.    set index to cust1,cust2
  19. endif
  20. seek cId_code
  21. if found()
  22.    mname    := CUSTOMER->company
  23.    mcontact := CUSTOMER->contact
  24.    @ 10,10 say "Company name...: " get mname
  25.    @ 11,10 say "Billing contact: " get mcontact
  26.    read
  27.    if lastkey() <> K_ESC
  28.       if rec_lock()
  29.          replace CUSTOMER->company with mname,;
  30.                  CUSTOMER->contact with mcontact
  31.          unlock
  32.       endif
  33.    endif
  34. endif
  35. return nil
  36.  
  37. // end of file CHP1607.PRG
  38.