FILEFLEX API REFERENCE



NAME
DBSetShared -- Set the sharing mode for a database

SYNTAX
DBSetShared(open-mode)

CATEGORY
Multi-user

DESCRIPTION
NEW IN FILEFLEX 3.0 -- MULTI-USER VERSION ONLY

DBSetShared determines how files are opened. This function is only available for the multi-user and client/server versions of FileFlex. In the single-user version of FileFlex, data files are always opened exclusively. DBSetShared takes one parameter, an open-mode code. The three valid open-mode codes are;

  • "x" - open exclusively, no other users may access the file
  • "rw" - open the file read/write, all other users may access the file
  • "rs" - open read/shared, the original user may write, all others may read the file, but not write to it.

Some notes on multi-user files: FileFlex will attempt to access a locked file or record at approximately one second intervals. It will continue to do so until it gains access. If we find this becomes a problem, in a future version we may allow you to set the number of access attempts or time. Also, to prevent conflict or "deadlock", be sure that all users always lock and unlock records and files in exactly the same order.


EXAMPLE
put DBSetShared("rs") into theResult 
put DBUse("VIDEO.DBF") into dbID

SEE ALSO
DBLockRecord, DBUnlock, DBLockDB, DBRefreshRelation

INTERNAL FUNCTION NUMBER
70


Copyright © 1992-1998 by David Gewirtz, under license to Component Enterprises, Inc.
Contact: info@component-net.com

Casa de Bender