ssis - Set Package User Variable Value in Integration Services and Run Package C# LoadFromSqlServer -


I have packages which I have imported integration services. I have prepared them all and I used to run them Have done My problem is that I am trying to pass a value to the program for my user variable in the package.

I have a start date and an expiration date that I want to populate but whatever I am doing, Did not even know. Can anyone help?

I'm new to using LoadFromSqlServer and in fact it is not certain that if there is more information that you need help, but if you ask me questions What is the need to add more?

Any help would be greatly appreciated thanks!

--- Edit ---

This error is found by using the code:

  App app = new app (); Package package = new package (); Variable variable = package. Package = app.LoadFromSqlServer ("\\ File \\ Path \\" + Ultimate, ".", "Username", "Password", blank); Variables ["User :: START_DATETIME"]. Value = startDate; Variable ["User: END_DATETIME"]. Value = endDate; DTSExecResult Results = Package. Exquisite ();  

Here is an error:

  Additional information: The variable can not be found. This occurs when attempts to obtain a variable from the variable collection on a container during the execution of the package, and the variable is not there, the variable name can not be changed or the variable is not being created.  

I was really able to find this issue with my question. It is rather silly but still there is a solution.

In my code I was using

  variable variable = the package.  

Before I was actually enclosing a package in my package variable.

After having the package, changing the code to call the variable has attached the work with my variable. The new code looks like this:

  app app = new app (); Package package = new package (); Package = app.LoadFromSqlServer ("\\ File \\ Path \\" + Ultimate, ".", "Username", "Password", blank); Variable variable = package. Variable ["START_DATETIME"] Value = startDate; Variable ["END_DATETIME"]. Value = endDate; DTSExecResult Results = Package. Exquisite ();  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -