home *** CD-ROM | disk | FTP | other *** search
- /* DBFHAND.CH - Clipper Header for use when using DBFHAND.PRG
-
- This file contains remaped USE, CLOSE, and CLEAR ALL commands
- in order to support the DBFHAND() function. It MUST be
- included in every file of a program that uses DBFHAND() (even
- if DBFHAND() is not called in the file).
-
- SUPPORTS: DBFHAND.PRG
-
- Copyright (c) 1990; The DSW Group, Ltd.
- */
-
- #command USE <db> [<new: NEW>] [ALIAS <a>] [INDEX <index,...>] ;
- [<ex: EXCLUSIVE>] [<sh: SHARED>] ;
- => ;
- if (<.new.>) ; __dbSelect(0) ; end ;;
- __DbfHandGrab();;
- __dbUse( <(db)>, <(a)>, <.sh.> .or. !(<.ex.> .or. M->__Exclusive) ) ;;
- if (!Used()); __DbfHandLetGo(); end ;;
- if (<.index.>) ; __dbSetIndex( { <(index)> } ) ; end
-
- #command USE => __dbClose(); __DbfHandLetGo()
-
- #command CLOSE <alias> => <alias>->( __dbClose(), __DbfHandLetGo() )
- #command CLOSE => __dbClose(); __DbfHandLetGo()
- #command CLOSE DATABASES => __dbCloseAll(); __DbfHandAllGone()
- #command CLOSE ALL => __dbCloseAll(); __DbfHandAllGone() ; M->__Format := {|| NIL }
-
- /* the command that knew too much */
- #command CLEAR ALL ;
- => ;
- __dbCloseAll() ; __DbfHandAllGone();;
- M->__Format := {|| NIL } ;;
- __MClear() ;;
- SetAlternate("") ; M->__Alternate := .f. ;;
- __KillRead() ; M->__GetList := {}
-
-
- //...........................................................
- // EOF: DBFHAND.CH