Custom SSIS Source: How do I make it create a new connection manager and display its properties window?
I am writing a custom SSIS source that uses a standard SSIS Flat File Connection Manager. I have got a working UI that shows all usable connection managers in a dropdown list and allows the user to pick one. I would like to be able to have a button that
the user can click on to create a new connection manager, and it would open the properties window for the new connection manager so it can be set up.
Abridged code:
Public Class MyNewSourceUI
Implements IDtsComponentUI
Private MetaData As IDTSComponentMetaData100
Public Function Edit(ByVal parentWindow As IWin32Window, _
ByVal variables As Variables, _
ByVal connections As Connections) As Boolean _
Implements Microsoft.SqlServer.Dts.Pipeline.Design.IDtsComponentUI.Edit
Dim UIwin As New MyNewSourcePropertiesWindow(MetaData, connections)
Return (UIwin.ShowDialog() = DialogResult.OK)
End Function
Public Sub Initialize(ByVal dtsComponentMetadata As IDTSComponentMetaData100, _
ByVal serviceProvider As System.IServiceProvider) _
Implements Microsoft.SqlServer.Dts.Pipeline.Design.IDtsComponentUI.Initialize
MetaData = dtsComponentMetadata
End Sub
End Class
Public Class MyNewSourcePropertiesWindow
Inherits System.Windows.Forms.Form
Private _metadata As IDTSComponentMetaData100
Private _cnxions As Connections
Public Sub New(ByVal ComponentMetaData As IDTSComponentMetaData100, ByVal connections As Connections)
InitializeComponent()
_metadata = ComponentMetaData
_cnxions = connections
ShowConnections()
'Setup Existing Metadata '
End Sub
Private Sub ShowConnections()
Me.cboConnection.Items.Clear()
Me.cboConnection.Items.AddRange((
From i As ConnectionManager In _cnxions _
Where CType(i.Properties("CreationName").GetValue(i), String) = "FLATFILE" _
AndAlso CType(i.Properties("Format").GetValue(i), String) = "Delimited" _
Select i.Name).ToArray())
End Sub
Private Sub btnNewConnection_Click(ByVal sender as Object, ByVal e as System.EventArgs) Handles btnNewConnection.Click
Dim newconn As ConnectionManager = _cnxions.Add("FLATFILE")
ShowConnections()
Me.cboConnection.SelectedItem = newconn.Name
End Sub
Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Me.DialogResult = DialogResult.Cancel
Me.Close()
End Sub
Private Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click
'Store any metadata changes '
Me.DialogResult = DialogResult.OK
Me.Close()
End Sub
End Class
That's what I've got so far. I had assumed that adding a new connection would automatically display the properties window to the user (right?). However, in my tests, what actually happens is that it creates the new source with a random GUID for a name and no
other properties set up, and puts it in the connections pane, and that's it. Not real useful.
Obviously, something else is required to make the properties window appear, but I can't find what it is. There's no ShowUI() member on any of the classes I have, and I haven't been able to find out the name of the UI class that's used by the flat file source.
Does anyone know how this is done? I know it can be done, because such a button exists in the normal Flat File Source UI.
Yes, you need to drive the UI creation. I see you create a custom connection manager, in this case on how to build its UI please refer to http://kzhendev.wordpress.com/2013/08/07/part-2-adding-a-custom-ui-to-the-connection-manager/
Arthur My Blog
Similar Messages
-
How many statements can be created with one connection?
how many statements can be created with one connection?
and on available memory. At some point, even were the database to allow an infinite number, you'd run out of memory.
-
How do I make it so users can log in and sign up on my adobe muse website
How do I make it so users can log in and sign up on my adobe muse website?
If you would read through the Muse forum, this subject has come up multiple times.
Muse does not currently support CMS, passwords, logins or bespoke client areas. -
How to a make a suggestion about new features i'd like to see in itunes
how to a make a suggestion about new features i'd like to see in itunes?
I can't find any link to do this. I found a page where you can request songs or an album to be added, but i can't find a page to submit my suggestions for itunes i have for new features i'd like to seeAs of now there is no good, direct link for feedback on iTunes itself. Writing Apple might be the best option, with the website feedback page perhaps the next best.
-
when i burn videos to a dvd-r disc it works on my macbook but not on a windows/pc or my dvd player. How can i make it work on all the above and not just a mac product?
Unfortunately, the recording & movie industry does not respect the rights of the people who make them money, and thus you can only use the paid-for content in ways they see fit. Even if I lived in a bunker where no one else could possibly see the movie I paid for, therefor I'm not 'sharing it illegally', I would still not be allowed in a blue moon to copy that movie to DVD for TV viewing. Someone will tell you to get an AppleTV. How about Apple give us one for free? Until this changes, people wanting to use their content in multiple locations will continue to download music & movies via torrents, legally or illegally.
-
How can you make your persona show on the top and bottom?
Also can you make it bigger at the top to show more of the picture?Add extra empty toolbars if you want to see more of the persona.<br />
You can create extra toolbars to get extra space via View > Toolbars > Customize<br />
You have to put something on a toolbar (drag a Space item onto it) before closing the Customize window because empty toolbars are automatically removed.<br />
See http://kb.mozillazine.org/Toolbar_customization -
When combining PDF's, the author is picked up from the first PDF opened. How can I make it use a new author when combining several documents?
Make sure that fast web view is enabled.
-
How can I make a global change so all controls and indicators labels on the front panel change to another colour?
I need to change the front panel so that it can be used in a dark environment.Hi
The only way I see, is to use the "Controls[]" property and iterate through all of them. But don't forget about nested elements (i.e. clusters, tab-controls, ...).
Thomas
Using LV8.0
Don't be afraid to rate a good answer... -
How can I make an image appear partially in front and partially behind another layer in Adobe Illustrator?
Put the image behind the layer (at the back of it or on a layer below). With it still selected, Copy.
Now Paste in Front (Ctrl+F). Depending on your Paste Remembers Layers setting, you may have to bring the newly pasted copy to the front, or to the upper layer.
Draw a shape over the image to define the portion of it you want to appear "in front."
With the shape and the image selected, clip the image using the shape. (Object > Clipping Mask > Make) -
How can I make sure an url to connect to a webinar will not work in another browser?
How can I make sure an url to connect to a webinar will not work in another browser? The url is using a session cookie instead of username/password to authenticate the user and has the following form: /r5ygd62w5za/?session=breezrek22zu756wgzy8r&launcher=false&refresh_parent=true
Try the [https://addons.mozilla.org/en-US/firefox/addon/2592/ NoSquint] add-on, it gives greater control over the zoom options.
-
How do I make an area of my clip colour and the rest B&W?
I heard about masking but how do I make an area of my clip colour and the rest B&W?
The filter you can use is Desaturate with Amount=100 in Image Control.
If you want to apply it to a fixed area within your clip, put a copy of the clip in V2 on top of the priginal (supposing your clip is in V1), apply Desaturate and use Crop in Motion tab of the viewer to define the edges of the rectangle; you can also use Edge Feather to smooth the borders.
If the portion you want black&white is actually a selected person or object in the clip then you must apply Chroma Keyer or 4/8 Point Matte to isolate that portion before applying Desaturate.
I hope I was clear...
Piero -
I only see the phone numbers of my contacts when using iMessage on my MAC, whereas I see the names on my iPhone. Why, and how can I make it so I see the names (and pics) on my MAC?
Thanks Eric, but that was already turned on. I just now tried turning it off and on again, no change. Actually, I"m more interested in seeing the names than the pictures. I now only see the phone numbers and generic avatars where pics would be.
-
I have had Firefox for years and in the last 2 weeks, I am getting all of these stupid Pop ups about credit reports and some Epic Play thing. How can I make sure I do not get them and why all of a sudden?
Identify and remove adware/malware
http://www.thesafemac.com/arg/ -
How do I make a slow spinning movement so character and scene turns upside down?
How do I make a slow spinning movement so character and scene turns upside down?
It's for a dream sequence.The better method (I feel) is to rotate the camera when shooting.
Certainly that is better. However, I don't have a way to do that, so I imagine that most people don't either. I can turn my tripod's head on its side, but upside down? Not so easy.
Having said that, there are camera cages designed to do that.
It is true that my way doesn't fill the frame so one way to handle that is to do it on a copy of the video on a higher track, and blur the heck out of the original to keep the frame filled. Some amount of blur is often associated with dream sequences. -
How can I make my computer only recognize my network and not that of one of my neighbors?
How can I make my computer only recognize my network and not that of one of my neighbors? This is for when I am at home, and everytime the computer goes to sleep it essentially loses the connection, only to pick up my neighbors network when it is awaken.
I am on Comcast (Xfinity) Highspeed Cable wireless modem/router
Thanks in advance!
MarkYou can make your network the preferred network.
> System Preferences... > Network > Advanced... > Drag your preferred network name to the top of the list.
Maybe you are looking for
-
Can't import ical dates into iphoto calendar
Hi all, I'm trying to make an iphoto calendar for a friend and I'm running into a frustrating problelm. My friend emailed me an ical birthday calendar which he would like to have included in the iphoto calendar. I imported the ical calendar into my o
-
How to display feeds with non-latin utf8 characters in Raggle?
Has anyone tried to use raggle to read feeds with non-latin utf8 characters? If you are successful, how to do it? Thanks
-
S35dvd: How to remove the HDD?
Can anyone tell me how to remove a hard drive from a s35dvd please? I can not find a service manual anywhere and I need to remove the drive to try to remove a load of viruses that i can't remove with windows running or even in safe mode. Thanks
-
At line-selection /at user-command in alv
hai , i used layout-listappend to output 3 alv's in one page .but after using layout-listappend i_usercommand in reuse_alv_.. is not working .so i tried to use at line selection . please guide me to solve this problem how to use at line-sele
-
My Iphone 5 camera is crashing or showing a purple line on the scream, any help?
Does anybody have a solution for this?