When you get errors like this you have the wrong mapping from the database type to the SSIS Variable type.
DTS_E_RUNTIMEVARIABLETYPECHANGEError: 0xC001F009 at Package: The type of the value being assigned to variable "User::Results" differs from the current variable type.
We tried the datatype "Object" on the variable used to hold the result set column values. That worked pretty well, or try ADO.Net connection manager to see if that works better than OLEDB connection manager.
When using SQL Native Client (OLEDB connection manager), for result set mapping of columns to variables, SQL type TinyInt maps to DT_UI1 managed database type, and that maps to BYTE Variable type. See also
http://sqlblogcasts.com/blogs/simons/archive/2006/02/24/SSIS-data-flows-and-tinyint.aspxIn SSIS 2005, SQL's BigInt maps to Object only, but using that workaround with SQL Native Client OLEDB is problematic since large values longer than 9 characters (for example 9876543210987) will get truncated to "987654321". So for wide bigint values, you'll have to use ADO.Net and connect to SQL Client and make the variable to be type Int64 for Bigint database types.
This was fixed in SSIS 2008, so that BigInt (I8/Int64) can map to strings without truncating the characters at the 9th position.
For other types not listed here, you can get a feel for which DT_ ssis types the columns in your query map to by looking at the appropriate mapping file (used for Import Export Wizard type mapping) in
C:\Program Files\Microsoft SQL Server\90\DTS\MappingFiles
C:\Program Files\Microsoft SQL Server\100\DTS\MappingFiles
For example, look in the file SQLClientToSSIS.xml to see how SQL Client column types map to the SSIS DT_ types.
Next after you see which DT_ type it maps to, look in the char at the top of the article
http://msdn.microsoft.com/en-us/library/ms345165.aspx to see which Set or Get method (.Net types) are used. That hints at which Variable type you should choose.
Thanks, Jason