January 3, 2018 at 7:15 pm
Help pls new here, i keep getting this:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig,
Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.
InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParams) at
Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
i am using the script to unzip files
January 3, 2018 at 8:30 pm
kelch4n_35 - Wednesday, January 3, 2018 7:15 PMHelp pls new here, i keep getting this:at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig,
Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.
InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParams) at
Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()i am using the script to unzip files
Normally you'd probably want to provide more information on what you are doing with what. I'll make some guesses - and that can give you an idea of what else you would want to provide. Is this in an SSIS package? Are you using a script task in the SSIS package? Is this an error you get just before the task actually executes?
When ever you hit an error, try to turn up the logging and logging levels to get more information. And in general, check any and all logs you can find that may have information about whatever errors or issues you are experiencing.
My first guess would be that you are using some package variables that you haven't declared in the script task. You need to explicitly declare them in the script task for them to be available to that task. That's one of the ways you can get that error.
Sue
January 3, 2018 at 8:40 pm
Sue_H - Wednesday, January 3, 2018 8:30 PMkelch4n_35 - Wednesday, January 3, 2018 7:15 PMHelp pls new here, i keep getting this:at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig,
Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.
InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParams) at
Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()i am using the script to unzip files
Normally you'd probably want to provide more information on what you are doing with what. I'll make some guesses - and that can give you an idea of what else you would want to provide. Is this in an SSIS package? Are you using a script task in the SSIS package? Is this an error you get just before the task actually executes?
When ever you hit an error, try to turn up the logging and logging levels to get more information. And in general, check any and all logs you can find that may have information about whatever errors or issues you are experiencing.
My first guess would be that you are using some package variables that you haven't declared in the script task. You need to explicitly declare them in the script task for them to be available to that task. That's one of the ways you can get that error.Sue
hi sorry for the lack of info, yes this is an SSIS oackage and i am using a script task, i got this error during the process, i did declare as shown below:
#region Namespaces
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
using System.IO.Compression;
using System.IO;
#endregion
namespace ST_1df7a0accc1042de877a7d4b840d5be9
{
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
{
public void Main()
{
string zipfullpath = Dts.Variables["User::ProcessFilePath"].Value.ToString();
string inputfolder = Dts.Variables["User::ProcessFolder"].Value.ToString();
using (ZipArchive arch = ZipFile.OpenRead(zipfullpath))
{
foreach (ZipArchiveEntry entry in arch.Entries)
{
entry.ExtractToFile(Path.Combine(inputfolder, entry.FullName));
}
}
File.Delete(zipfullpath);
// TODO: Add your code here
Dts.TaskResult = (int)ScriptResults.Success;
}
enum ScriptResults
{
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
};
#endregion
}
}
January 4, 2018 at 3:45 pm
kelch4n_35 - Wednesday, January 3, 2018 8:40 PMhi sorry for the lack of info, yes this is an SSIS oackage and i am using a script task, i got this error during the process, i did declare as shown below:#region Namespaces
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
using System.IO.Compression;
using System.IO;#endregion
namespace ST_1df7a0accc1042de877a7d4b840d5be9
{public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
{public void Main()
{string zipfullpath = Dts.Variables["User::ProcessFilePath"].Value.ToString();
string inputfolder = Dts.Variables["User::ProcessFolder"].Value.ToString();using (ZipArchive arch = ZipFile.OpenRead(zipfullpath))
{
foreach (ZipArchiveEntry entry in arch.Entries)
{
entry.ExtractToFile(Path.Combine(inputfolder, entry.FullName));
}
}
File.Delete(zipfullpath);
// TODO: Add your code hereDts.TaskResult = (int)ScriptResults.Success;
}enum ScriptResults
{
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
};
#endregion}
}
No idea if it's while the script task is running. Try logging in the task to get an idea on where things are breaking down - here is an example from the documentation:
Logging in the Script Task
And here is a post with similar alternatives:
How to get detail error description of a script task
Sue
January 10, 2018 at 9:29 am
This was removed by the editor as SPAM
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply