Solved

migrating SSIS from 2005 to 2008

Posted on 2012-12-28
7
196 Views
Last Modified: 2013-02-08
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
0
Comment
Question by:crcsupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 8

Assisted Solution

by:venk_r
venk_r earned 200 total points
ID: 38727436
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
0
 
LVL 25

Accepted Solution

by:
TempDBA earned 100 total points
ID: 38729711
What happens when you run it manually?
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 100 total points
ID: 38730064
venk_r,

The author is using SSIS not DTS.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 8

Assisted Solution

by:venk_r
venk_r earned 200 total points
ID: 38730151
asperkins,
Im sorry . I missed that .

crcsupport,
Please try using
namespace System.IO
and see if it works.
0
 
LVL 21

Assisted Solution

by:Alpesh Patel
Alpesh Patel earned 100 total points
ID: 38734058
For that Just Open script task and Script editor and close it. It will resolve your issue.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 38868022
Please do.  There is nothing relevant here at all.

Anthony
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
tempdb log keep growing 7 56
SQL server client app 3 75
Connect to SQL 2008 r2 server over the Internet 4 78
Applying Roles in Common Scenarios 3 43
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question