February 17, 2010 at 8:28 am
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.
February 17, 2010 at 10:42 am
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
February 17, 2010 at 10:48 am
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. 🙂
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/
February 17, 2010 at 11:41 am
I didn't do anything special to make it this way, I just used what the object provided..
CEWII
February 17, 2010 at 11:49 am
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.
February 17, 2010 at 1:03 pm
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
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply