Bonsoir,

cette fonction me pose problème, trop long à l’exécution et parfois même ça plante

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
Function Admin_Validate_DeleteArbreComplet(id_entite)
	Set RsComValidateArbreComplet = Server.CreateObject("ADODB.RecordSet") 
	'Validation de l'entite en cours
	Admin_Validate_DeleteEntite(id_entite)
	'Validation des relations avec l'entite en cours
	sqlComValidateArbreComplet="SELECT     * FROM         am3_entites WHERE     (id_entite_dependante = '"&id_entite&"')"   
	RsComValidateArbreComplet.Open sqlComValidateArbreComplet , connAm3 , 1 , 1
	Do While Not RsComValidateArbreComplet.EOF
		Admin_Validate_DeleteArbreComplet(RsComValidateArbreComplet("id_entite"))
	RsComValidateArbreComplet.movenext
	Loop
	RsComValidateArbreComplet.Close
End Function
que pourrais je faire pour la rendre plus efficace ?

Merci de votre aide