Web
Site
Search
Home
Agenda
Links
Bloggers
Over PASS Nederland
User benefits
Geregistreerd... en dan?
Sponsoring
Artikelen
Cursussen en certificering
SQL Server 2000
SQL Server 2005
Examenrecensies
Archief nieuwsbrieven
2005
Nieuwsbrief 1 / 09-10-2005
2006
Nieuwsbrief 2 / 16-01-2006
Nieuwsbrief 3 / 11-03-2006
Nieuwsbrief 4 / 11-04-2006
Nieuwsbrief 5 / 08-05-2006
Nieuwsbrief 6 / 18-06-2006
Nieuwsbrief 7 / 27-08-2006
Nieuwsbrief 8 / 20-10-2006
Nieuwsbrief 9 / 22-12-2006
2007
Nieuwsbrief 10 / 04-02-2007
Nieuwsbrief 11 / 05-03-2007
Nieuwsbrief 12 / 02-04-2007
Nieuwsbrief 13 / 01-05-2007
Nieuwsbrief 14 / 01-06-2007
Nieuwsbrief 15 / 02-09-2007
Nieuwsbrief 16 / 04-10-2007
Nieuwsbrief 17 / 05-11-2007
Nieuwsbrief 18 / 06-12-2007
2008
Nieuwsbrief 19 / 12-01-2008
Nieuwsbrief 20 / 14-02-2008
Nieuwsbrief 21 / 02-05-2008
Nieuwsbrief 22 / 16-06-2008
Nieuwsbrief 23 / 01-08-2008
Nieuwsbrief 24 / 13-11-2008
Nieuwsbrief 25 / 01-12-2008
2009
Nieuwsbrief 26 / 07-02-2009
Nieuwsbrief 27 / 09-03-2009
Nieuwsbrief 28 / 01-04-2009
Nieuwsbrief 29 / 04-06-2009
Nieuwsbrief 30 / 02-09-2009
Nieuwsbrief 31 / 06-10-2009
Nieuwsbrief 32 / 07-11-2009
Nieuwsbrief 33 / 04-12-2009
Forum
onze sponsors
Forum
Login
|
Register
Forum
Unanswered
Active Topics
Forums
Search
Forums
>
Forums
>
Business Intelligence
Subject: SSIS Custom component
Prev
Next
You are not authorized to post a reply.
Author
Messages
Oldest First
Newest First
Antoon Vansina
Posts:17
10-07-2007 10:24:59
Alert
Kan er iemand helpen met het volgende probleempje?
I'm creating an custom data destination component and have been using the MS
examples and some examples on the internet to get it right.
I Keep getting an error in the AquireConnections method and I can't figure
out why.
The method is:
"CA2201:DoNotRaiseReservedExceptionTypes")> _
Public Overloads Overrides Sub AcquireConnections(ByVal transaction As
Object)
If ComponentMetaData.RuntimeConnectionCollection.Count = 1 Then
Dim connection As IDTSRuntimeConnection90 =
ComponentMetaData.RuntimeConnectionCollection(0)
If Not (connection.ConnectionManager Is Nothing) Then
Dim cm As ConnectionManager =
DtsConvert.ToConnectionManager(connection.ConnectionManager)
Dim con As ConnectionManagerOleDb = CType(cm.InnerObject,
ConnectionManagerOleDb)
If con Is Nothing Then
Throw New Exception("The ConnectionManager " + cm.Name +
" is not a Oledb connection manager.")
Else
conSQL = CType(con.AcquireConnection(transaction),
OleDbConnection)
If conSQL Is Nothing Then
Throw New Exception("The ConnectionManager " +
cm.Name + " is not a oleDB connection manager.")
End If
End If
End If
End If
End Sub
The statement
Dim con As ConnectionManagerOleDb = CType(cm.InnerObject,
connectionManagerOleDb)
trows an error:
Unable to cast COM object of type 'System.__ComObject' to class type
'System.Data.OleDb.OleDbConnection'. Instances of types that represent COM
components cannot be cast to types that do not represent COM components;
however they can be cast to interfaces as long as the underlying COM
component supports QueryInterface calls for the IID of the interface.
The connection that I'm adding is a native OleDB connection to a SQL db.
I tried changing everything to ado.net (code and connection): same problem
If I try
ctype(cm.InnerObject, ConnectionManagerOleDb ).ConnectionString
in the Watch window I do get a result ?!
Could this have anything to do with security settings? (ProtectionLEvel =
DTSPL_ENCRYPTSENSITIVE_USERKEY {1}) or some general option?
Antoon Vansina
Posts:17
30-08-2007 17:30:01
Alert
Ben er uiteindelijk uitgeraakt. Heb heel de boel op http://antoon.blog.com//SSIS+-+Error+logging/ gezet
You are not authorized to post a reply.
Algemeen
--Forum regels
PASS Nederland
--Aankondigingen
--Bijeenkomsten
--PASS Nederland Algemeen
Forums
--DBA
--Ontwikkelen
--Business Intelligence
--Metadata (SIG)
--Performance (SIG)
--High Availability (SIG)
--XML (SIG)
--Algemeen
SQL Server
Forums
>
Forums
>
Business Intelligence
> SSIS Custom component
ActiveForums 3.6
Copyright (c) 2012 PASS Nederland
Privacy Statement
Terms Of Use