Bonjour a tous
je cherche a récupérer les excutables d'un package SQL Server Intégration Services.
j'ai recuprer un script que je pourais adapter mais j'ai un petit sousis au niveau de TaskHost. voila le code que j'utilse :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
            string str_MyPkg = @"D:\Visual Studio 2005\Projects\Integration Services Project2\Integration Services Project2\Package.dtsx";
 
            Application app = new Application();
            Package pkg_MyPakage = app.LoadPackage(str_MyPkg, null);
            Executables exc_MyExecutables = pkg_MyPakage.Executables;
 
            ExecutableEnumerator myEnumerator = exc_MyExecutables.GetEnumerator();
 
 
            Console.WriteLine("ici");
 
            int i = 0;
            Executable myExec;
            TaskHost myTH;
            while ((myEnumerator.MoveNext()) && (myEnumerator.Current != null))
            {
                myExec = (Executable)myEnumerator.Current;
                myTH = (TaskHost)myExec;
                Console.WriteLine("[{0}] {1}", i++, myExec.toString);
            }
            // Reset puts the index pointer before the beginning.
            // Do not retrieve from the collection until MoveNext is called.
            myEnumerator.Reset();
            myEnumerator.MoveNext();
merci de votre aide !