Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Faulting module name: DTS.dll, version: 2009.100.1600.1, Exception code: 0xc0000005

$
0
0
I have created one application and running SSIS Package dynamically with expression.I am using SQLserver 2008 R2

But while running the code Application got crashed.I saw event viewer and found below exception in event viewer

Faulting module name: DTS.dll, version: 2009.100.1600.1, Exception code: 0xc0000005

Faulting module path: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTS.dll.

When I run my c#application to execute the pacakge see code below:                      
public DTSExecResult ExecutePackageFromFile(string packageName, IDictionary<string, object> variablesMap, out Package pkg)
        {
            Application app = new Application();
            pkg= app.LoadPackage(packageName, null,true);

            //set package varaibles
            Microsoft.SqlServer.Dts.Runtime.Variables vars = pkg.Variables;
            IEnumerator<KeyValuePair<string, object>> varEnumarators = variablesMap.GetEnumerator();
            while (varEnumarators.MoveNext())
            {
                KeyValuePair<string, object> item = varEnumarators.Current;
                                {
                    vars[item.Key].Value = item.Value;


            }

//This line crashes the application
            return pkg.Execute();
      }

Note: Package gets executed if I don't use any sql command as expression.But application gets crashed when I use expression in pacakge and gives above Faulting module error.

Please help me.

Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>