Unable to Add Data row for cells having null Values

Hi All,

I am having difficulty reading data from database which also null values in various columns. I am using queue to read each row. After updating in web application, I need to update everything in another database.

I am using build datatable and adding Data row after processing each queue. But due to null values, add data row activity is throwing object reference not set to an instance on an object error.

I have different data types in my datatable like Int, Date, String, Double.

I have tried below method to by pass null values but its not working.
{IF(string.IsNullOrEmpty(variable.ToString),”“, variable.ToString).ToString} for each transaction item but it doesnt seem to be working.

Please help with the above problem. Thank You.

I also tried to replace Null values with “” using below code in assign activity.

(From r In dt_A.AsEnumerable
Let ra = r.ItemArray.Select(Function (e) If(isNothing(e) OrElse String.IsNullOrEmpty(e.toString), “”, e)).toArray
Select dt_B.Rows.Add(ra)).CopyToDataTable()

But i am getting below error which may be due to Date Column in the datatable
Assign: String was not recognized as a valid DateTime.Couldn’t store <> in ActionDate Column. Expected type is DateTime.

Can someone please help me?

is it ensured that not the datatable var is null?

Datatable is not null. It has all the value which are not null in database. Once null value issue is resolved i need to pass datatable rows into queue to process them individually