Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00532997
Message ID:
00538580
Vues:
9
Hi Steve
>Do you use the same button when saving a record that someone is editing?
No I have an Add/Save and an Edit/Save. This is what is in my edit/save button:
                DO CASE
			CASE ALLTRIM(UPPER(THIS.COMMAND8.CAPTION)) = 'EDIT'
				FOR START = 2 TO 16
					THISBOX = 'THISFORM.RFI_TEXTBOX'+ALLTRIM(STR(START))+'.READONLY'
					&THISBOX = .F.
				ENDFOR
				FOR START = 1 TO 3
					THISBOX = 'THISFORM.RFI_TEXTBOX'+ALLTRIM(STR(STRART)+'.READONLY'
					&THISBOX = .F.
				ENDIF
				THIS.COMMAND8.CAPTION = 'Save'
			CASE ALLTRIM(UPPER(THIS.COMMAND8.CAPTION)) = 'SAVE'
				BEGIN TRANSACTION
				IF TABLEUPDATE()
					END TRANSACTION
				ELSE
					ROLLBACK
					MESSAGEBOX('Record could not be updated.',64,'Error Upating'		)
				ENDIF	
				THIS.COMMAND8.CAPTION = 'Edit'
		ENDCASE
The PK is really assigned in the default value of the field in the table
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform