Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Who pulled the trigger?
Message
De
21/04/1999 15:06:26
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Who pulled the trigger?
Divers
Thread ID:
00210699
Message ID:
00210699
Vues:
45
Hi All:

I am making some modifications to Jim Duffy's code that was in Aug FoxAdvisor... one of them is to eliminate having to pass a code for which trigger called the code... here is what I came up with, it seems to work in my testing, can anyone see anything wrong with it?
* Determine if this code was called from the Update, Delete, or Insert trigger
lcFldState = getfldstate(-1)
do case
	case '3'$lcFldState or '4'$lcFldState or ('2'$lcFldState and !deleted())
		* insert trigger was called

	case '2'$lcFldState and deleted()
		* delete trigger was called

	otherwise
		* update trigger was called

endcase
Thanks,
BOb
Répondre
Fil
Voir

Click here to load this message in the networking platform