Difference between revisions of "SET EXCLUSIVE"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Determines whether or not table and index files are opened shareable | Determines whether or not table and index files are opened shareable | ||
− | |||
==Syntax== | ==Syntax== | ||
SET EXCLUSIVE ON | OFF | (<expL>) | SET EXCLUSIVE ON | OFF | (<expL>) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[INDEX | + | [[INDEX]], [[PACK]], [[REINDEX]], [[SET MULTIUSER]], [[USE]], [[ZAP]] |
− | + | ||
==Description== | ==Description== | ||
If SET EXCLUSIVE is ON when a table and its associated index files are opened, then the table and index files cannot be by another user until they are closed. If SET EXCLUSIVE is OFF when a table and its associated index files are opened, then the table and index files are shareable by multiple users. | If SET EXCLUSIVE is ON when a table and its associated index files are opened, then the table and index files cannot be by another user until they are closed. If SET EXCLUSIVE is OFF when a table and its associated index files are opened, then the table and index files are shareable by multiple users. | ||
− | File and record locking to control concurrent updates to the table and index files is automatically enforced if EXCLUSIVE was OFF when the table was opened. | + | File and record locking to control concurrent updates to the table and index files is automatically enforced if EXCLUSIVE was OFF when the table was opened. |
− | + | ||
==Example== | ==Example== | ||
Line 42: | Line 38: | ||
return</code> | return</code> | ||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] |
Revision as of 10:45, 9 February 2012
Contents
Purpose
Determines whether or not table and index files are opened shareable
Syntax
SET EXCLUSIVE ON | OFF | (<expL>)
See Also
INDEX, PACK, REINDEX, SET MULTIUSER, USE, ZAP
Description
If SET EXCLUSIVE is ON when a table and its associated index files are opened, then the table and index files cannot be by another user until they are closed. If SET EXCLUSIVE is OFF when a table and its associated index files are opened, then the table and index files are shareable by multiple users.
File and record locking to control concurrent updates to the table and index files is automatically enforced if EXCLUSIVE was OFF when the table was opened.
Example
// Close today’s payments procedure close_day set exclusive on set view to accounts if used() select payments set dcache to reccount() set dcache on seek dtos(date()) total on dtos(payment_date)+emp_no to (cdow(date)); while payment_date = date() seek dtos(date()) delete rest while payment_date = date() pack else dialog box "Cannot open payments exclusively." endif set exclusive off set view to payments return