Difference between revisions of "CURSORGETPROP()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(One intermediate revision by one user not shown) | |||
Line 13: | Line 13: | ||
==Description== | ==Description== | ||
The CURSORGETPROP() function can be used to return the current property settings for a table or cursor. | The CURSORGETPROP() function can be used to return the current property settings for a table or cursor. | ||
+ | |||
If the optional <workarea | alias> is specified, then the function will operate in the required location. | If the optional <workarea | alias> is specified, then the function will operate in the required location. | ||
Line 22: | Line 23: | ||
|- | |- | ||
|} | |} | ||
+ | |||
====Return Value==== | ====Return Value==== | ||
Line 27: | Line 29: | ||
!Value||Description | !Value||Description | ||
|- | |- | ||
− | | | + | |1||Row and table buffering are off (default) |
− | + | |- | |
− | + | |2||Pessimistic row buffering is on | |
− | 2 | + | |- |
− | + | |3||Optimistic row buffering is on | |
− | 3 | + | |- |
− | + | |4||Pessimistic table buffering is on | |
− | 4 | + | |- |
− | + | |5||Optimistic table buffering is on | |
− | 5 | + | |
|- | |- | ||
|} | |} |
Latest revision as of 12:14, 22 August 2011
Contents
Purpose
Function to return the current property settings for a table or cursor
Syntax
CURSORGETPROP(<expC> [, <workarea | alias>])
See Also
CURSORSETPROP(), CURVAL(), GETFLDSTATE(), OLDVAL(), TABLEREVERT(), TABLEUPDATE(), SETFLDSTATE()
Description
The CURSORGETPROP() function can be used to return the current property settings for a table or cursor.
If the optional <workarea | alias> is specified, then the function will operate in the required location.
<expC>
Value | Description |
---|---|
Buffering | Current Buffering setting |
Return Value
Value | Description |
---|---|
1 | Row and table buffering are off (default) |
2 | Pessimistic row buffering is on |
3 | Optimistic row buffering is on |
4 | Pessimistic table buffering is on |
5 | Optimistic table buffering is on |
Example
close databases clear set exclusive off open database southwind use customers // Set to known value before start replace customerid with "ALFKI" cursorsetprop("Buffering", 5, "customers") messagebox("Buffering set to " +etos(cursorgetprop("Buffering"))) ? "Original customerid value: " + customerid ? "Curval(): " + curval("customerid") ? "Oldval(): " + oldval("customerid") ? "Fieldstate at start: " + getfldstate("customerid") replace customerid WITH "RECIT" // Alter in another session ! recital -c "update southwind\!customers set customerid = 'MULTI' where recno() = 1" ? "Someone else just updated the record!" ? "New customerid value: " + customerid ? "Curval(): " + curval("customerid") ? "Oldval(): " + oldval("customerid") ? "Fieldstate after replace: " + getfldstate("customerid") tablerevert(.T.) ? "Reverted customerid value: " + customerid ? "Curval(): " + curval("customerid") ? "Oldval(): " + oldval("customerid") ? "Fieldstate after revert: " + getfldstate("customerid") replace customerid WITH "RECIT" ? "New customerid value: " + customerid tableupdate(.T.) ? "Updated customerid value: " + customerid ? "Curval(): " + curval("customerid") ? "Oldval(): " + oldval("customerid") ? "Fieldstate after replace and update: " + getfldstate("customerid") ?
Products
Recital, Recital Server