Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record Optimistic
Message
From
11/09/2000 19:21:53
 
 
To
11/09/2000 12:19:58
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00414959
Message ID:
00415194
Views:
17
Chuck,

HTH and Hopefully, someone more experienced will jump on this thread. Here is what I think I know:

>VFP 6.0

>Regarding RECORD OPTIMISTIC, my question is if no one else is looking at the >same record in the network and the end-user attempts to update the changes, >this would AUTOMATICALLY lock the record and then update the data. Would it >still remain LOCKED and thus, I would have to issue UNLOCK command?

Buffering, in effect, takes over the FP2.X LOCK() functions. With optimistic, the current record is "locked" only when the write is made, and then automatically "unlocked" (less error processing....). I recommend you do not consider locking/unlocking commands on your own hook.

>If someone is looking at the record and the other end-user attempt to update >that record, would that still update the record without any error or warning? >Just that the person that is viewing the data would have the "old" data and >once the person leaves the record and come back, it will be updated then.

Yes. Your update will proceed (considering you are still in your optimistic mode above). REM: the rule is 'lock' occurs only in the write mode. Your assumption on the view is correct.

>I am still having trouble trying to set the VFP 6.0 Options to make all my >projects allow the end-user to jump around the fields in a form (or grid or >browse or whatever) and not be bothered with each "Field validation" that >would not let the end-user leave that field until it is correct (meaning can >not be left blank and then come back, or typing something weird and then come >back). The MS book says "In the Table tab of the Table Designer, enter the >rule and error message you want in the Rule and Message boxes.", where's that? >I want to do record-level validation.

You are entering some head water here. IMO - You must first ask the question about what is valid data? Is the validation always to occur: yes = table validation). Is the validation case sensitive (i.e., certain orders need certain delivery dates, etc), yes: use a form validation from a class object for that field. Is it a one off (blue shirts on tuesday can be courier or mail delivery)? Use a form textbox valid. Well, this is how I see it.

As to the table tab, issue a MODIFY STRUCTURE on any table (don't forget exclusive) which is in a database. You will see three tabs: Fields, Indexes, Tables. The Tables tab is where you enter you table field validation.

>Lastly, opinions, is this the general way for "business-like" applications?

Well, I gave you my opinion. Let those who have gone before advise you better.

Ric
Previous
Reply
Map
View

Click here to load this message in the networking platform