Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MultiUser Issue
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
MultiUser Issue
Divers
Thread ID:
00540233
Message ID:
00540233
Vues:
50
I have form whose buffer mode is pessimistic and the cursor in the data environment is pessimistic row buffering
(I would use OR buffering if I could get it to work).
The form has a that has a button that I am using for an edit/save.
As long as I am dealing with one user the code works fine, but
I have been tring for days to figure out how I can handle the issues with multiusers clicking the edit/save button.

Here is a sample of my edit/save code:
		DO CASE
			CASE ALLTRIM(UPPER(THIS.COMMAND8.CAPTION)) = 'EDIT'
				** this will handle the command buttons
				FOR START = 1 TO 9
					THISBUTTON = 'THIS.COMMAND'+ALLTRIM(STR(START))+'.ENABLED'
					IF START != 8
						&THISBUTTON = .F.
					ELSE
						&THISBUTTON = .T.
					ENDIF
				ENDFOR
				**** this is for the textboxes
				FOR START = 2 TO 16
					THISBOX = 'THISFORM.RFI_TEXTBOX'+ALLTRIM(STR(START))+'.READONLY'
					&THISBOX = .F.
				ENDFOR
				**** this is for the editboxes
				FOR START = 1 TO 3
					THISBOX = 'THISFORM.RFI_EDITBOX'+ALLTRIM(STR(START))+'.READONLY'
					&THISBOX = .F.
				ENDFOR
				THIS.COMMAND8.CAPTION = 'Save'
			CASE ALLTRIM(UPPER(THIS.COMMAND8.CAPTION)) = 'SAVE'
				lnResult = MESSAGEBOX('Are you sure you want to save',32+4,'Save Changes')				
				IF lnResult = 6
					DO SAVE_DATA WITH .T.

				ELSE
					DO REVERT_DATA WITH .F.
				ENDIF
                                *** change the textboxes back
				FOR START = 2 TO 16
					THISBOX = 'THISFORM.RFI_TEXTBOX'+ALLTRIM(STR(START))+'.READONLY'
					&THISBOX = .T.
				ENDFOR
                                 ******* change the edit boxes back
				FOR START = 1 TO 3
					THISBOX = 'THISFORM.RFI_EDITBOX'+ALLTRIM(STR(START))+'.READONLY'
					&THISBOX = .T.
				ENDFOR
				THIS.COMMAND8.CAPTION = 'Edit'
				** this will handle the command buttons
				FOR START = 1 TO 9
					THISBUTTON = 'THIS.COMMAND'+ALLTRIM(STR(START))+'.ENABLED'
					IF START != 8
						&THISBUTTON = .T.
					ELSE
						&THISBUTTON = .T.
					ENDIF
				ENDFOR
		ENDCASE
Thanks in advance
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide

LeRoy Jackson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform