migrating SSIS from 2005 to 2008

crcsupport
crcsupport used Ask the Experts™
on
I have script task in a package. It works fine on SQL2005. It doesn't work on SQL 2008. It does not give error message, just can not find the file.This is the code:

Imports System
Imports System.Data
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

      Public Sub Main()

        If System.IO.File.Exists(Dts.Variables("FilePath").Value.ToString()) Then
            Dts.Variables("FileExists").Value = True
        Else
            Dts.Variables("FileExists").Value = False
        End If
        Dts.TaskResult = Dts.Results.Success
      
End Sub

End Class
Any ideas what could be the problem ?

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I think you might need to download DTS Run time librabries from microsoft for backward compatibility as sql 2008 doesnt support it anymore.

http://msdn.microsoft.com/en-us/library/ms143755(v=sql.105).aspx
Commented:
What happens when you run it manually?
Top Expert 2012
Commented:
venk_r,

The author is using SSIS not DTS.
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Commented:
asperkins,
Im sorry . I missed that .

crcsupport,
Please try using
namespace System.IO
and see if it works.
Alpesh PatelSolution Architect at TCS (SAFe®Agilist, TOGAF® Foundation, PSM I®, MCP, MCSD)
Commented:
For that Just Open script task and Script editor and close it. It will resolve your issue.
Top Expert 2012

Commented:
Please do.  There is nothing relevant here at all.

Anthony

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial