Difference between revisions of "CURSORSETPROP()"
From Lianjapedia
m (Text replace - "Recital" to "Lianja") |
Helen.george (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to define current property settings for a table or cursor | Function to define current property settings for a table or cursor | ||
− | |||
==Syntax== | ==Syntax== | ||
CURSORSETPROP(<expC>, <expN> [, <workarea | alias>]) | CURSORSETPROP(<expC>, <expN> [, <workarea | alias>]) | ||
− | |||
==See Also== | ==See Also== | ||
[[CURSORGETPROP()]], [[CURVAL()]], [[GETFLDSTATE()]], [[OLDVAL()]], [[TABLEREVERT()]], [[TABLEUPDATE()]], [[SETFLDSTATE()]] | [[CURSORGETPROP()]], [[CURVAL()]], [[GETFLDSTATE()]], [[OLDVAL()]], [[TABLEREVERT()]], [[TABLEUPDATE()]], [[SETFLDSTATE()]] | ||
− | |||
==Description== | ==Description== | ||
Line 23: | Line 20: | ||
|- | |- | ||
|} | |} | ||
− | |||
====<expN>==== | ====<expN>==== | ||
Line 40: | Line 36: | ||
|- | |- | ||
|} | |} | ||
− | |||
==Example== | ==Example== | ||
Line 85: | Line 80: | ||
? | ? | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== |
Revision as of 11:43, 11 December 2012
Purpose
Function to define current property settings for a table or cursor
Syntax
CURSORSETPROP(<expC>, <expN> [, <workarea | alias>])
See Also
CURSORGETPROP(), CURVAL(), GETFLDSTATE(), OLDVAL(), TABLEREVERT(), TABLEUPDATE(), SETFLDSTATE()
Description
The CURSORSETPROP() function can be used to define 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 |
<expN>
Value | Description |
---|---|
1 | Row and table buffering off (default) |
2 | Pessimistic row buffering on |
3 | Optimistic row buffering on |
4 | Pessimistic table buffering on |
5 | Optimistic table buffering 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
Lianja, Lianja Server