SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Integration Service Script Component


Integration Service Script Component

Author
Message
Elmer Miller-184883
Elmer Miller-184883
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 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.
Elliott Whitlow
Elliott Whitlow
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24630 Visits: 5314
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
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27662 Visits: 4895
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/
Elliott Whitlow
Elliott Whitlow
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24630 Visits: 5314
I didn't do anything special to make it this way, I just used what the object provided..

CEWII
Elmer Miller-184883
Elmer Miller-184883
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 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.
Elliott Whitlow
Elliott Whitlow
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24630 Visits: 5314
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search