![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hello ktrock, This code was probably written for a script task, not an external program. In the case that I want to round-robin data sources like you suggest there, I start the package with a ScriptTask that does the test. Here's a slightly different example of the script within that task: Imports System.Data.OleDb Public Class ScriptMain Public Sub Main() Try ' test the connection for what you mean by "data isn't available" Dim conn As New OleDbConnection(Dts.Connections(0).ConnectionStrin g) conn.Open() conn.Close() Catch ex As OleDbException System.Windows.Forms.MessageBox.Show(ex.Message) Dts.Connections(0).ConnectionString = "Data Source=.;Initial Catalog=scratch;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;" Dts.TaskResult = Dts.Results.Success Catch ex As Exception Dts.TaskResult = Dts.Results.Failure End Try End Sub End Class Can you shed more like on how you are designing the package? Thanks! Kent Tegels DevelopMentor http://staff.develop.com/ktegels/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |