‎21-11-2017 03:22 PM
Helllo,
I'm trying to use a variable on a select query, but one of the application name has a simple cote on the name, I then get an error message. The code works fine on other applications.
The application name on error : (COURS : Accèder aux documents d'un cours)
The code I use :
################################################################
For Each oApp In myRoot.GetCollection("Application")
sApp = oApp.GetProp("Nom court")
If myRoot.GetSelection("Select [Application] Where [Nom court] = '" & sApp & "'" & "", "Nom court").Count > "1" Then <=== line with error
Worksheets("Objet_en_doublon").Cells(i, 1).Value = "Application"
Worksheets("Objet_en_doublon").Cells(i, 2).Value = oApp.GetProp("Nom court")
Worksheets("Objet_en_doublon").Cells(i, 3).Value = oApp.GetProp("Nom")
Worksheets("Objet_en_doublon").Cells(i, 4).Value = oApp.GetProp("_HexaIdAbs")
i = i + 1
End If
Next
#################################################################################
Thank you for your help
Mehdi
Solved! Go to Solution.
‎05-12-2017 10:22 AM
Thank you for your help, it works
‎28-11-2017 12:21 PM
Hello,
you try this:
If GetRoot.GetSelection("Select [Application] Where [Nom court] = """ & sApp & """").Count > 1 Then
...
End If
Regards
‎28-11-2017 11:37 AM
Hello,
If you have any other technique to check for duplicate objects on Mega repository please share it.
Thank you