|
I am want to take a CSV output (which is UTF-16) and converting it using a script task. The reason is that I need to send the file to 3 different customers/suppliers that have different encoding. I have the following .NET code but it keep throwing amd error. Error: Failed to lock variable "C:\EXPORT.csv" for read/write access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
(comments are locked)
|
|
You code looks fine, but I have a theory. When you wanted to add the variable for read/write access, how did you add it? If you directly add the variable to the list (on the Script page of the Task Editor), it should work fine (but see additional note below). If you added the variable as an expression for the ReadWriteVariables property, then the value of the variable is included in the list instead of the variable itself. Additional Note: I believe you also need to change your code from
to
I haven't used VB.NET in awhile, but I know you have to do that with C#. Otherwise, you are trying to convert the Variable object itself. Tom.. I also made that that change, Thanks. Took me 3 hours! Taking a break from a problem clears the mind and makes way for a "eureka" moment. Thanks again
Oct 22 '09 at 04:32 PM
sp_lock
(comments are locked)
|
|
Sort this... I didnt defind the input variables correctly via the Task.
(comments are locked)
|

