Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiuser programming question 1

Status
Not open for further replies.

johncook

Programmer
Nov 24, 2002
154
0
0
US
Big Picture question:

All transactions are tracked to a shift identifier.

App has a Close Shift function.

User on workstation 1 closes the shift.

User on workstation 2 has a form up that shows the current shift PRIOR to workstation 1 closing the shift.

Unless workstation 2 refreshes the form and underlying data, BEFORE performing a transaction, the transaction will be marked with the PREVIOUS shift's identifier.

I have several functions that are conceptually the same problem. I understand (or think I do), multiuser record locking, etc. but this seems to be more a matter of "big picture" approach to how I have designed the app.

I need suggestions or a better understanding. I have read all the posts on multiuser and read the VFP help on developing in a multiuser environment but nothing there seems to help.

Thanks,
John


 
Data integrity issues are a whole separate issue than procedural issues.
It sounds like you need to force users to enter data in their own session/time frame/user id rather than worry about how the data may be stored.
Multi-user programming is not that different than single user. But data integrity is usually left up to the business rules, written by the programmer.

You may also want to check into transactions though.
TABLEUPDATE(), ROLLBACK(), etc.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Hi Dave, Thanks for the input.

Would this be a true statement:

For resolving the issue I defined, I need a business rule.

The rule I am obviously missing is: Anytime a transaction occurs (that is tracked to a shift), a refreshing of the shift identifier, must occur prior to performing the transaction.

Thanks,
John

 
Well, you really shouldn't rely on anything outside the application for integrity. By that I mean both user and mechanical. Some thoughts:
For instance, for a user, you shouldn't rely on the user to begin and end a days worth of activity for another user. It should probably be some sort of configured setting, or an action that determines the activity.
After or before each transaction is to take place, and updated result set should be obtained. If it is necessary for a screen to be refreshed before posting data, make sure that is the first thing done.
For mechanical for instance, the data may need to should be updated regularly, and the PC clock may need to be synchronized with an outside source, if it is a time critical app. Not relying on the computer itself.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks Dave,
I am starting to get it. Basically anything that needs current data as part of the transaction being processed, and if that needed data could be changed by a different user or process (timer etc.) I must get the latest data FIRST.

Of course that makes logical sense. I just needed someone to tell me. HAHA.

Thanks again,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top