December 20, 2016 at 12:09 pm
I'm trying to copy a Template File to another folder.
There is an issue with the last line of code.Any ideas?
Public Sub Main()
Dim sSource As String
Dim sTarget As String
Dim File As String
sSource = "U:\ZZZ_ImportCreditDataNew\ImportCreditDataNew\Templates\SSISErrorLog.xlsx"
sTarget = "U:\ZZZ_ImportCreditDataNew\ImportCreditDataNew\SSISErrorLog.xlsx"
File.Copy(sSource, sTarget, True)
Dts.TaskResult = ScriptResults.Success
End Sub
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 20, 2016 at 12:11 pm
Welsh Corgi (12/20/2016)
There is an issue with the last line of code.Any ideas?
what is the issue? you've been around long enough to know exact errors and a description of the problem are needed.
do you get an error? what error? did you google the error?
Lowell
December 20, 2016 at 12:48 pm
For a simple file copy, since you're using Integration Services, would it make more sense to use the File System Task rather than trying to build your own in script?
December 20, 2016 at 1:36 pm
Error at:
File.Copy(sSource, sTarget, True)
Access of Shared Member, Contact, enum, member or NestedType through an instance,qualifying expression will not be evaluated.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 20, 2016 at 1:40 pm
Chris Harshman (12/20/2016)
For a simple file copy, since you're using Integration Services, would it make more sense to use the File System Task rather than trying to build your own in script?
Thank you.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy