Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetFldState and Buffering
Message
From
23/08/2002 07:03:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
GetFldState and Buffering
Miscellaneous
Thread ID:
00692825
Message ID:
00692825
Views:
52
Hello All,

I'm hoping someone can clarify a point that's bothering me for some time. I have code in the stored procedures of my databases that looks like this:

llAdding = INLIST(LEFT(GetFldState(-1), 1), "3", "4")

llAdding will be set to .T. if I'm in the process of adding a record and will be .F. if I'm editing a record.

All of my data entry forms use parameterized views (which of course are row buffered by default). So everything works just fine.

However, if I use a table from the command window (no buffering) and insert a record, the above code still works just fine even though the table is not buffered. According to the documentation, GetFldState() only works on buffered data. I was really suprised that the above code is still working. I was concerned that if a user happens to have VFP installed and somehow opens a table and modifies or add data, the above code would not be able to tell if the user is adding or editing an existing record.

So I have tested the code in the stored procedures when using a table directly (no buffering) and just before and after the variable is set, there is indeed no buffering (CursorGetProp("Buffering") = 1), but the variable is set to .T. if I am adding and set to .F. if I'm editing.

So I'm wondering if anyone else noticed this behavior? By the way I'm using VFP6 with service pack 5.

Thank you very much
Pat Moran
Next
Reply
Map
View

Click here to load this message in the networking platform