Skip to content
Advertisement

SSIS Script Task throws Object reference not set to an instance of an object

I am trying to query the database and send the content in the body of the email. When I try to run the package it throws deadlock error. Can anyone please suggest what is that I am missing

Script is like below

Below is the

enter image description here

And the package looks like below.. For every user I need to get all the order and order details and send it to them as email. SO I have the script within the Loop

enter image description here

Earlier I was getting deadlock error and I changed few things referring to different articles and now I am getting below error

Advertisement

Answer

My guess is that this is your error (varCollection is null and you are referencing something that is null):

Assign it just like you did the line before…

However, I think you are trying this. Email Data is a recordset stored in an object. this is the logic you want for that.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement