Cannot assign from type 'System.Object' to type 'System.Data.DataRow' in Assign activity

Assigning “Nothing” to “Transactionitem”, which is a dataRow, getting the below error.
"Cannot assign from type ‘System.Object’ to type ‘System.Data.DataRow’ in Assign activity"

I tried -

  1. removing “Nothing” Keyword, saving the file and adding it back to assign activity.
  2. deleted assign activity and re-added it by myself.
  3. refreshed and restarted UiPath Studio.

But no use, the error is still present.

Please Anyone Guide me.

1 Like

Hi,

Do you use Studio 25.10.0?

I think Assign activity in 25.10.0 has problem of it.

MultipleAssign activity may solve this matter. However, runtime error may occur.

Regards,

3 Likes

In Studio 2025.0.175 STS its working, but if not working for you, you can force the convertion of data type using: CType(“yourdatahere“, “youdatatype“)

1 Like

Yes, it’s the 25.10.0 version, and the multi-assign activity is working.

Thank You, Youchi.

Thank You Gabriel. I will look into it and for now multi-assign was working fine.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.