Script Task freezing on Vista -
03-18-2009
, 11:27 AM
Hello,
I have an SSIS package that has been running successfully for quite some
time. It is a very simple package: prompts user for a filename (using Script
task) and exports data to that filename. Recently, the package "hangs" when
running the script task to prompt the user for a filename. Here is the script:
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Windows.Forms
Public Class ScriptMain
' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables,
events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to
indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.
' _
Public Sub Main()
Dim saveFileDialog1 As New SaveFileDialog
saveFileDialog1.InitialDirectory = "My Documents"
saveFileDialog1.Filter = "Text Files (*.txt)|*.txt"
saveFileDialog1.RestoreDirectory = True
If saveFileDialog1.ShowDialog() = DialogResult.OK Then
Dts.Variables("ExportFilename").Value = saveFileDialog1.FileName
Dts.TaskResult = Dts.Results.Success
Else
Dts.TaskResult = Dts.Results.Failure
End If
End Sub
End Class
This is now failing/hanging (on the showdialog statement) on all Windows
Vista machines (was working previously) but still works on an XP machine.
Any ideas would be appreciated - I'm at the point where I don't even know
where to look! (are there any log files that might help me??)
Thanks,
Cheri |