Facing Error in "Execute Sql task" component (The type of the value (DBNull) being assigned to variable) Hope you are doing well
I have a table as you can see below :



I have a variable "ExcelPath"  in "SSIS" in which I keep "FilePath" column .

Then I have "Execute SQL task" and the query I wrote in this task as you can see below 


If you compare the sql query with the table you find out that I need to retrieve "DestinationTable" column where the "Filepath" column is equal to what is in my variable "ExcelPath"

the parameter mapping tab is configured like this :


and the result set tab shows I want the output into another variable called "TableName"


I think everything is fine , I have no idea why I'm getting this error :
"The type of the value (DBNull) being assigned to variable "User::TableName" differs from the current variable type (String)"

I was wondering if you could help me up with this issue.
Thanks in advance
Problem Solved .
See, I wanted to retrieve only one column on my table so I set the result set of the general tab to "single row"
as you can see here :


as you can see here



And in result set tab , I configured the resultName to my column name