CAH debugVerrou-fr : Différence entre versions

De BlueWiki
Ligne 5 : Ligne 5 :
  
 
Exemple de log :
 
Exemple de log :
  2018-12-15T13:01:41Z : Création du log 2018-12-15T13:01:41Z : [Société] LockedSet (3 records) - Method : Test_Lock (11) 2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16) 2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16) 2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16)
+
  2018-12-15T13:01:41Z : Création du log
 +
2018-12-15T13:01:41Z : [Société] LockedSet (3 records) - Method : Test_Lock (11)
 +
2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16)
 +
2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16)
 +
2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16)
  
 
Le code avant les insertions de contrôle
 
Le code avant les insertions de contrôle
Ligne 11 : Ligne 15 :
  
 
Le code après les insertions de contrôle
 
Le code après les insertions de contrôle
  LECTURE SEULEMENT([Société]) TOUT SÉLECTIONNER([Société])  APPLIQUER À SÉLECTION([Société];[Société]Nom:=[Société]Nom) ANACAHM_DebugLockingRecord ("Selection";"Test_Lock (11)";->[Société])  DÉBUT SELECTION([Société]) Tant que (Non(Fin de sélection([Société]))) [Société]Nom:=[Société]Nom STOCKER ENREGISTREMENT([Société]) ANACAHM_DebugLockingRecord ("record";"Test_Lock (16)";->[Société]) ENREGISTREMENT SUIVANT([Société]) Fin tant que  
+
  TOUT SÉLECTIONNER([Société])
 +
 +
  APPLIQUER À SÉLECTION([Société];[Société]Nom:=[Société]Nom)
 +
ANACAHM_DebugLockingRecord ("Selection";"Test_Lock (Line 11)";->[Société]) // insert by CAH 2018-12-04
 +
 +
  DÉBUT SELECTION([Société])
 +
Tant que (Non(Fin de sélection([Société])))
 +
[Société]Nom:=[Société]Nom
 +
 +
STOCKER ENREGISTREMENT([Société])
 +
ANACAHM_DebugLockingRecord ("record";"Test_Lock (Line 16)";->[Société]) // insert by CAH 2018-12-04
 +
ENREGISTREMENT SUIVANT([Société])
 +
Fin tant que  
  
 
le CAH vous permet bien sur de retirer tout ce code de contrôle.
 
le CAH vous permet bien sur de retirer tout ce code de contrôle.
  
 
Il vous permet également d'obtenir ds statistiques sur les enregistrements dans votre base.
 
Il vous permet également d'obtenir ds statistiques sur les enregistrements dans votre base.

Version du 15 décembre 2018 à 15:08

L'objectif de cet outil est de vous permettre de déterminé les verrouillages d’enregistrements mal gérés dans une base 4D.

Pour ce faire le CAH va installer avant ou après l'appel de commandes enregistrant des données une méthode qui va contrôler si l'enregistrement c'est bien déroulé. Si ce n'est pas le cas la méthode va inscrire dans le log (LockingRecordLog.txt) qui sera créer dans le dossier des logs de la base l'heure et le problème rencontré.

Exemple de log :

2018-12-15T13:01:41Z : Création du log
2018-12-15T13:01:41Z : [Société] LockedSet (3 records) - Method : Test_Lock (11)
2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16)
2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16)
2018-12-15T13:01:41Z : Record Lock (Société)- Test_Lock (16)

Le code avant les insertions de contrôle


Le code après les insertions de contrôle

TOUT SÉLECTIONNER([Société])

APPLIQUER À SÉLECTION([Société];[Société]Nom:=[Société]Nom)
ANACAHM_DebugLockingRecord ("Selection";"Test_Lock (Line 11)";->[Société])  // insert by CAH 2018-12-04

DÉBUT SELECTION([Société])
Tant que (Non(Fin de sélection([Société])))
	[Société]Nom:=[Société]Nom
	
	STOCKER ENREGISTREMENT([Société])
	ANACAHM_DebugLockingRecord ("record";"Test_Lock (Line 16)";->[Société])  // insert by CAH 2018-12-04
	ENREGISTREMENT SUIVANT([Société])
Fin tant que 

le CAH vous permet bien sur de retirer tout ce code de contrôle.

Il vous permet également d'obtenir ds statistiques sur les enregistrements dans votre base.