Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key
Message
 
À
01/08/2001 10:14:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
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:
00538359
Vues:
10
Thanks Hilmar!!!
I did have an add button that will double as a save button. So the Code looks like this:
DO CASE
       CASE ALLTRIM(UPPER(This.Command5.CAPTION)) = 'Add'
		SELECT PAID_TOB
		SET ORDER TO PAID_ID
		APPEND BLANK
		THISFORM.REFRESH()
		THIS.COMMAND5.CAPTION = 'Save'
       CASE ALLTRIM(UPPER(THIS.COMMAND5.CAPTION)) = 'SAVE'
	        BEGIN TRANSACTION
	        REPLACE ENTEREDBY WITH ALLTRIM(SYS(0)) +' '+ALLTRIM(GETENV('USER')) ;
	   	        ENTERDATE WITH DATETIME()
	        REPLACE PAID_ID WITH GETKEY('PAID_TOB')
	        IF TABLEUPDATE()
	              END TRANSACTION
	        ELSE
	              ROLLBACK
	              MESSAGEBOX('This Record could not be added',64,'Error Adding Record')
	        ENDIF		
	        THIS.COMMAND5.CAPTION = 'Add'	
ENDCASE
also in the GETKEY() function, I changed the if Found() to IF SEEK(alltrim(upper(tcTable))
For Some odd reason the Found would not go into the if statement, but the Seek() would.
Go figure :-)

Now I will try to do this on multiple sessions and see if it works
Thanks Again
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