A VB.NET toolkit for writing SSIS Script Tasks

  • I take it you are working on "Lesson 3: Create an input dialog box" that takes the input from the input box and prints it to an output dialog box?

    Did the output dialog box work right when you did "Lesson 2: Create an output dialog box?"

  • Yes it did. I was just going to reply back that I had found what appears to be a fix for this:

    using new Form() as the first param.

  • So you are doing this in an SSIS script task or Visual Studio/Visual Basic Express?

    If you are using a Form() object, I suspect you are not in SSIS.

  • Here's an example of what I mean, using this part of your code:

    'Create and loop through an array list

    Dim MyList As New ArrayList

    MyList.Add("Apple")

    MyList.Add("Orange")

    MyList.Add("Banana")

    MyList.Add("Peach")

    MyList.Add("Cherry")

    Dim i As Integer

    Dim value As String

    For Each value In MyList

    Dim button As DialogResult = MessageBox.Show(New Form(), value.ToString(), "ArrayList Value " + i.ToString, MessageBoxButtons.OK)

    i += 1

    Next

    Dts.TaskResult = ScriptResults.Success

    End Sub

  • You added the counting integer. It must have something to do with that. Glad you got it working!

  • Adding the New Form(), as the first parameter of the MessageBox.Show is what got this to work. If I remove it, it doesn't work.

    I'm in the BIDS and followed the instructions you gave. It was only when I modified as above was I able to get it to work correctly. As stated, I am using windows 7. I also have a few other apps open. Does your code work without the modification in windows 7?

  • It is the change I indicated that made the difference (new form()). If removed, only the 1st dialog shows.

    Are you using Windows 7 to test?

    (Sorry for the repeat - didn't know it was sent...)

  • My code works as-is in Windows 7.

    Here it is pasted into an SSIS 2008 script task.

    http://i.imgur.com/vnuX5x9.png

    Here is is when I run it.

    http://i.imgur.com/HQ6HU3v.png

  • Yes - I am using same and get same. I run by right-clicking script task and execute. I also see Orange next. However, to see the next two dialogs, I have to click on icon that is in taskbar. See part of code below:

    For Each value In MyList

    ' Dim button As DialogResult = MessageBox.Show(New Form(), value.ToString(), "ArrayList Value " + i.ToString, MessageBoxButtons.OK) 'this works

    Dim button As DialogResult = MessageBox.Show(value.ToString(), "ArrayList Value " + i.ToString, MessageBoxButtons.OK) 'this only shows first two dialogs - then have to click on taskbar icon to see next two dialogs

    i += 1

    Next

    BTW: it works fine in debug mode - but otherwise, have this problem with

  • When I click the OK button, the next message box pops up. All five of them come up as they should.

    Can you try it on another workstation?

  • Perhaps - but not at the moment. When I get around to it, I'll let you know. Thanks for the responses.

  • I've tried it on two computers now and it works on both.

  • This was removed by the editor as SPAM

Viewing 13 posts - 16 through 27 (of 27 total)

You must be logged in to reply to this topic. Login to reply