1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| '* AUTHENTIFICATION & CREATION D'UNE INSTANCE DE TDCONNECTION
Set tdc = CreateObject("TDApiOle80.TDConnection")
'* CONNEXION AU SERVEUR DE TRAITEMENT
Reponse = InputBox("Entrer l'URL","Serveur QC","http://de1199ac:8080/qcbin")
tdc.InitConnectionEX Reponse
'* AUTHENTIFICATION AVEC UN PROFIL
User = split(Reponse,":",2)
tdc.login "maintenance", "intradevQC90"
'* CONNEXION AU PROJET
Reponse = InputBox("Entrer un projet","Projet QC","DEFAULT:QC_ALTAIR")
Project = split(Reponse,":",2)
tdc.Connect project(0), project(1)
'* CREATION D'UNE INSTANCE DES CHAMPS PERSONNALISABLES
Set objCustFields = tdc.Customization.Fields
'* CHARGEMENT DE LA CONFIGURATION ACTUELLE
tdc.Customization.Load
'* CONNEXION AU FICHIER POUR RECUPERATION DES VALEURS
Const ForReading = 1, ForWriting = 2
Dim oFso, f
Set oFso = CreateObject("Scripting.FileSystemObject")
'* LECTURE DU FICHIER TEXTE
Reponse1 = InputBox("Entrez le Nom de votre Table","File Input","C:\Test\Req.txt")
Set f = oFso.OpenTextFile(Reponse1, ForReading)
While Not f.AtEndOfStream
'* INDICE DES CHAMPS DANS LA LISTE
If f.ReadLine = "RQ_REQ_AUTHOR" then
Set theCustFields = objCustFields.Fields ("REQ")
'* INTITIALISATION DES VARIABLES i = 1
Do
'* IGNORER LE CHAMP...
Set aCustField = theCustFields(i)
i = i + 1
Loop while aCustField.ColumnName <> "RQ_REQ_AUTHOR"
' AFFECTATION DU LABEL EN FRANCAIS
aCustField.UserLabel = "Créée Par"
End If
Wend
f.Close
'* ENREGISTREMENT DES MODIFICATIONS EN BASE DE DONNEES
tdc.Customization.Commit
'*DECONNEXION
tdc.Disconnect
tdc.Logout
tdc.ReleaseConnection
Set tdc = Nothing
'* MESSAGE DE FIN
MsgBox "Traduction terminée" |
Partager