CAH debugVerrou-fr : Différence entre versions

De BlueWiki
Ligne 12 : Ligne 12 :
  
 
'''Le code avant les insertions de contrôle'''
 
'''Le code avant les insertions de contrôle'''
 
+
TOUT SÉLECTIONNER([Société])
 +
 +
APPLIQUER À SÉLECTION([Société];[Société]Nom:=[Société]Nom)
 +
 +
DÉBUT SELECTION([Société])
 +
Tant que (Non(Fin de sélection([Société])))
 +
[Société]Nom:=[Société]Nom
 +
 +
STOCKER ENREGISTREMENT([Société])
 +
ENREGISTREMENT SUIVANT([Société])
 +
Fin tant que
  
 
'''Le code après les insertions de contrôle'''
 
'''Le code après les insertions de contrôle'''
Ligne 18 : Ligne 28 :
 
   
 
   
 
  APPLIQUER À SÉLECTION([Société];[Société]Nom:=[Société]Nom)
 
  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
+
  ANACAH_DebugLockingRecord ("Selection";"Test_Lock (Line 11)";->[Société])  // insert by CAH 2018-12-04
 
   
 
   
 
  DÉBUT SELECTION([Société])
 
  DÉBUT SELECTION([Société])
Ligne 25 : Ligne 35 :
 
 
 
 
 
  STOCKER ENREGISTREMENT([Société])
 
  STOCKER ENREGISTREMENT([Société])
  ANACAHM_DebugLockingRecord ("record";"Test_Lock (Line 16)";->[Société])  // insert by CAH 2018-12-04
+
  ANACAH_DebugLockingRecord ("record";"Test_Lock (Line 16)";->[Société])  // insert by CAH 2018-12-04
 
  ENREGISTREMENT SUIVANT([Société])
 
  ENREGISTREMENT SUIVANT([Société])
 
  Fin tant que  
 
  Fin tant que  

Version du 15 décembre 2018 à 15:11

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:09:05Z : Création du log
2018-12-15T13:09:05Z : [Société] LockedSet (3 records) - Method : Test_Lock (Line 11)
2018-12-15T13:09:05Z : [Société] Record Lock - Test_Lock (Line 16)
2018-12-15T13:09:05Z : [Société] Record Lock - Test_Lock (Line 16)
2018-12-15T13:09:05Z : [Société] Record Lock - Test_Lock (Line 16)

Le code avant les insertions de contrôle

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

APPLIQUER À SÉLECTION([Société];[Société]Nom:=[Société]Nom)

DÉBUT SELECTION([Société])
Tant que (Non(Fin de sélection([Société])))
	[Société]Nom:=[Société]Nom
	
	STOCKER ENREGISTREMENT([Société])
	ENREGISTREMENT SUIVANT([Société])
Fin tant que 

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)
ANACAH_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é])
	ANACAH_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.