home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 16.7 Replace statement lock
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- #include "INKEY.CH"
-
- function upd_cust(cId_code)
- LOCAL mname,mcontact
- memvar getlist
- use CUSTOMER shared new
- if ! neterr()
- set index to cust1,cust2
- endif
- seek cId_code
- if found()
- mname := CUSTOMER->company
- mcontact := CUSTOMER->contact
- @ 10,10 say "Company name...: " get mname
- @ 11,10 say "Billing contact: " get mcontact
- read
- if lastkey() <> K_ESC
- if rec_lock()
- replace CUSTOMER->company with mname,;
- CUSTOMER->contact with mcontact
- unlock
- endif
- endif
- endif
- return nil
-
- // end of file CHP1607.PRG
-