title: Error: The type of the value (DBNull) being assigned to variable "User:: differs from the current variable type (String)
body: <p>I am creating a SSIS package and getting the following error while extracting the data.</p>
  
  <p>Error: The type of the value (DBNull) being assigned to variable "User::dunsId" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.</p>
  
  <p>dunsId is varchar(150) in the source table which is nullable column and contains Null value.
  The variable that I have created in SSIS to map it is of type string. I am basically trying to extract all he records and insert it in the destination table that contains column dunsId is varchar(150)</p>
  
  <p>here is my insert query</p>
  
  <pre><code>INSERT INTO Parties (companyId, dunsId, companyName, companyTypeId,companyTypeName,companyStatusTypeId,companyStatusTypeName,simpleIndustryId,simpleIndustryDescription)  
  values (companyId, dunsId, companyName, companyTypeId, companyTypeName,companyStatusTypeId,companyStatusTypeName,simpleIndustryId,simpleIndustryDescription)
  </code></pre>
  
  <p>Parameter mapping
  <a href="https://i.stack.imgur.com/ntRFx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ntRFx.png" alt="enter image description here"></a></p>
  
  <p>variables</p>
  
  <p><a href="https://i.stack.imgur.com/QyD1r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QyD1r.png" alt="enter image description here"></a></p>
  
  <p>design </p>
  
  <p><a href="https://i.stack.imgur.com/5IrOt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5IrOt.png" alt="enter image description here"></a></p>