Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table Buffering, Detecting a Record Delete by Another Us
Message
From
17/09/1997 00:44:32
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
16/09/1997 17:17:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00050289
Message ID:
00050343
Views:
27
>In VFP5 how do I detect if another user has deleted the current record when table buffering is used?

GETFLDSTATE(cFieldName | nFieldNumber [, cTableAlias | nWorkArea])

Returns Numeric

Arguments
cFieldName | nFieldNumber Specifies the name of the field or the number of the field for which the edit status is returned. The field number nFieldNumber corresponds to the position of the field in the table or cursor structure. DISPLAY STRUCTURE or FIELD( ) can be used to determine a field’s number.

You can specify –1 for nFieldNumber to return a character string consisting of deletion and edit status values for all fields in the table or cursor. For example, if a table has five fields and only the first field has been edited, GETFLDSTATE( ) returns the following 121111

The 1 in the first position indicates the deletion status has not been changed.

You can also include 0 for nFieldNumber to determine if the deletion status of the current record has changed since the table or cursor was opened.

Note Using GETFLDSTATE( ) only determines if the deletion status of the current record has changed. For example, if you mark a record for deletion and then recall it, GETFLDSTATE( ) indicates the deletion status has changed even though the record’s deletion status has returned to its original state. Use DELETED( ) to determine the current deletion status of a record.

cTableAlias Specifies the alias of the table or cursor for which the field edit or record deletion status is returned.

nWorkArea Specifies the work area of the table or cursor for which the field edit or record deletion status is returned.

If you do not specify an alias or work area, GETFLDSTATE( ) returns a value for a field in the currently selected table or cursor.

Remarks

The following table lists the character return values and the corresponding edit or deletion status.

Return value Edit or deletion status
1 Field has not been edited or deletion status has not changed.
2 Field has been edited or deletion status has changed.
3 Field in an appended record has not been edited or deletion status has not changed for the appended record.
4 Field in an appended record has been edited or deletion status has changed for the appended record.
Row or table buffering must first be enabled with CURSORSETPROP( ) for GETFLDSTATE( ) to operate on local tables.
The edit or deletion status is returned for the table or cursor open in the currently selected work area if GETFLDSTATE( ) is issued without the optional cTableAlias or nWorkArea arguments.Take a look at the GETFLDSTATE(1)
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform