Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Integration Service Script Component Expand / Collapse
Author
Message
Posted Wednesday, February 17, 2010 8:28 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, October 27, 2011 2:35 PM
Points: 98, Visits: 85
I encountered a problem using the Script Component (used in dataflow), when used as a transform. This component allows you to add output columns, but the datatypes of these colunns do not allow nulls. Is there a 'trick' that will allow these columns to accept nulls?

BTW. I posted to the [SQL Server 2008 - General] forum because there doesn't seem to be a forum dedicated to SQL 2008 SSIS.
Post #867143
Posted Wednesday, February 17, 2010 10:42 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, May 15, 2014 5:11 PM
Points: 6,067, Visits: 5,283
Using a code snippet I used for an example before:
    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Row.RecId_IsNull = True
End Sub

This assumes the field name is RecId, and this is actually from SSIS 2005, but I believe it is the same in 2008.

CEWII
Post #867296
Posted Wednesday, February 17, 2010 10:48 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 3:55 PM
Points: 4,186, Visits: 4,264
I like Elliot's work around, it is very clever.

Listed below is an article that discusses this issue and may be an alternative but I like Elliot's approach.

http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/4554075c-5f68-4e59-9f7c-8d46c05e8ec6


For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #867301
Posted Wednesday, February 17, 2010 11:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, May 15, 2014 5:11 PM
Points: 6,067, Visits: 5,283
I didn't do anything special to make it this way, I just used what the object provided..

CEWII
Post #867346
Posted Wednesday, February 17, 2010 11:49 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, October 27, 2011 2:35 PM
Points: 98, Visits: 85
Great! Thanks for the info. I should have discovered that myself. I just have to check for nulls and handle appropriately. I was hoping to be able to use a nullable datatype, but this is fine. I have to jump though hoops with the BlobColumn datatype too, but I have that figured out as well. Thanks again.
Post #867351
Posted Wednesday, February 17, 2010 1:03 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, May 15, 2014 5:11 PM
Points: 6,067, Visits: 5,283
It was not obvious the first few times I worked with it, but in retrospect if I had been looking, it would have made complete sense.. Glad things worked out for you..

CEWII
Post #867448
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse