Showing posts with label doesn039t. Show all posts
Showing posts with label doesn039t. Show all posts

Saturday, February 25, 2012

Custom Connection Manger Doesn't Show Up In VS

I have created a custom connection manager and it was showing up fine as was the UI I created for it. For some reason now no matter what I do I cannot get it to show up in the list when right-clicking and choosing New connection...

I have also created two custom tasks. One of them works perfectly. The second was working but now causes an error when you open the package. Here is the error message:

TITLE: Microsoft Visual Studio

There were errors while the package was being loaded.
The package might be corrupted.
See the Error List for details.

There are no additional errors in the list only this one. I have tried everything I can think of to fix these two issues. Both problems emerged at the same time so may be related but that would not explain why the second custom task I have created works fine and doesn't cause errors.

Help!

Thanks,

Dave

1. CM: have you defined a public class with DtsConnection attribute that defines ConnectionType and other properties? Once you do it, install the assembly to GAC and DTS\Connections folder, then restart SSIS service.

2. Hard to diagnose remotely :) Try attaching debugger to DevEnv.exe process, and monitor first-chance exceptions - this usually gives the hint of what's wrong.

|||I've seen that error when the task is either not installed correctly (GAC + DTS\Tasks folder) or you have changed something such that the XML will have changed, e.g. Added a new property and not handled it in Upgrade.|||

EUREKA!!

I found the problem for the errors I was receiving on my custom task.

While the SSIS persistance framework can cope with simple data type properties on your custom task, it cannot copy with things as mundane as string or integer arrays but there are no errors at design time!

It recognizes the array properties and even gives you the nice builder for them in the properties window. You can click Save and then close the package all without incident. When you reopen the package, it carks it because it can't load the values for those properties. No error saying that that is the problem. All you see is the error message that is in my original post.

Where can I file a bug report/feature request to have this fixed? It has cost me nearly a week trying to figure it out.

Dave

|||

You can make request and report bugs at http://connect.microsoft.com

If you roll your own load and save methods you can handle it quite happily, just implement IDTSComponentPersist.

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.