Solved

migrating SSIS from 2005 to 2008

Posted on 2012-12-28
7
193 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
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now