Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_secure() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_SECURE()

 DESCRIPTION

 The C_SECURE() function allows a database file to be secured
 (locked) so that the file can not be opened in dBASE or by a
 Clipper program.  This provides a measure of system security and
 protects data integrity by preventing a user from viewing or
 updating a database file in another Clipper program or in
 interpreted dBASE.  The C_SECURE() function can be used to both
 secure (lock) and unsecure (unlock) the database file.

 NOTES

 A database file that is secured with C_SECURE() can not be opened
 by dBASE or any Clipper program until the file is unsecured with
 another call to C_SECURE().

 SYNTAX

 C_SECURE(dbf, toggle [,network])

 PARAMETERS

 dbf (C) is the name of the database file, including the path (if
 needed), to secure or unsecure.  The file name must include the
 .DBF extension (i.e. main.dbf).

 toggle (L) indicates whether the database file is to be secured or
 unsecured.  Specify true (.T.) to secure the database file so it
 can not be opened, or false (.F.) to unsecure the file so it can be
 opened.

 network (L) indicates whether or not the program is running on a
 network.  If the program is running on a network pass true (.T.) so
 the file can be opened with the proper share access, otherwise pass
 false (.F.).  If network is not specified, the default of false
 (.F.) is used.

 RETURNS

 C_SECURE() returns true (.T.) if the database file was secured or
 unsecured successfully, or false (.F.) if unsuccessful.

 EXAMPLES

 Procedure Main         && First procedure in program

 ** Take secure off of DBF files
 c_secure("main.dbf",.f.)         && Unsecure (unlock) databases
 c_secure("trans.dbf",.f.)
 ...
 ...              && Do program
 ...
 ** Exit Code        && Get ready to exit program
 close databases
 ** Put secure on DBF files
 c_secure("main.dbf",.t.)         && Secure (lock) databases
 c_secure("trans.dbf",.t.)
 quit


See Also: C_SETDBT() C_EXIST() C_ISDBF() C_ISDBT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson