Saturday, February 25, 2012

Custom connection manager doesn't show up in VS?

I've created a very simple custom connection manager, and I followed the deployment instructions at http://msdn2.microsoft.com/en-us/library/ms345276.aspx. Basically, that was just copying the assembly to %programfiles%\Microsoft SQL Server\90\DTS\Connections, and then registering the asssembly in the gac.

However, when I open VS, right-click on the connection manager pane, and then choose new connection, my custom manager does not appear. What am I missing?

Here is the class:

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.SqlServer.Dts.Runtime;

using System.Data.SqlClient;

using System.Xml;

namespace MyCoolCompany

{

[DtsConnection(DisplayName="Sharepoint Connection Manager",

Description="Connect to Sharepoint lists",

ConnectionType="Sharepoint",

ConnectionContact="My Cool Company",

UITypeName="SPDataFlowComponent, MyCoolCompany.SharepointConnectionManagerUI")]

class SharepointConnectionManager: ConnectionManagerBase

{

}

}

this is because your class is SharepointConnectionManager private

The code should be:

public class SharepointConnectionManager: ConnectionManagerBase

HTH,
Ovidiu

|||Oh, duh :( It's always the simple things that kick my butt! Thanks a lot for that.|||

I have follwed the instruction from MSDN exactly, I can see my cusom connection manager listed with the others.

But when I have to add it to the Package, an error occured indicating, that the "connectionType" can not be found.

The samples from SSIS including 2 connection managers work properly, but with a different connectiontype do not.

Please help, what I should do exception to that what is on MSDN .

Thand you

|||

What is the value for the connection type attribute property you have set?

What is the full error? What exactly are you doing at the time of the error?

|||

Thank you for the response.

I have written a Customo Connection Manager, with the Type provided in the Class-Attribue "Outlook",

and the following Error was occurred, when I want to add it to the Package :

For the connecting manager '{1E4D8049-5916-4034-A298-C702CAC1F3CB' given Outlook-connecting type is not recognised as a valid connection manager's type. This mistake is returned if a connecting manager is provided for an unknown connecting type. Check whether you have properly given the name of the connecting type. (Package)

And these are the calls from the SSIS-Designer:

bei Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnections90.Add(String bstrConnectionType)
bei Microsoft.SqlServer.Dts.Runtime.Connections.Add(String connectionType)

my Code is as follow :

[

DtsConnection(ConnectionType = "Outlook",

DisplayName = "OutlookConnectionManager",

Description = "An Outlook Connection Manager",

IconResource = "Oraylis.Dts.ConnectionManagers.OutlookConnManagerIcon.ico")

]

publicclassOutlookConnManager : ConnectionManagerBase

{

privatestring Filename;

OutlookConnManager()

{

Filename = string.Empty;

}

publicoverridestring ConnectionString

{

get { returnthis.Filename; }

set { this.Filename = value; }

}

publicoverrideobject AcquireConnection(object txn)

{

}

publicoverridevoid ReleaseConnection(object connection)

{

}

publicoverrideDTSExecResult Validate(IDTSInfoEvents infoEvents)

{

returnDTSExecResult.Success;

}

}

The connection manager should at the moment do nothing, just to be inserted in the Package.

No comments:

Post a Comment