"Insert: Failed to convert parameter value from a String to a Single."

I need to copy data from an Excel table that has null columns and paste it into SQL Server, but it’s not allowing it because it’s giving this error “Insert: Failed to convert parameter value from a String to a Single.” How can I write null data from the table in the Bank?

Hi Thiago,

Please check if the table columns in SQL DB are configured to allow Null values. Only when there is a NULL constraint on any of the columns , you will not be able to insert null values else there is no restriction from Uipath side. Also verify once if datatable and SQL table column data types are matching. Only in that case you get this type of error.

Hope this helps.

Regards,
Sruthi YNM

Hey,
Check if your table in the database has the column data types same as that of the columns present in the datatable.

Yes, all columns are allowed Null values. When I use the insert activity, I get this error at the end. This image here is from the BD


image

Hi.
my guess is that de “Ano” field is a string in uipath, therefore when you try to add it to sql this error occur.

You can make sure that the “Ano” is realy a integer in uipath ?

The problem is here! the fact that the lines are empty is giving this error, when I fill it with “0” it runs normally! Only I need to get Null.

use “” instead of “0”.

But it won’t be Null in the database .

how can i fix this? I’ve tried several different ways and I haven’t been able to.

May be some unexpected syntax or values being passed. Can you try to capture what values are being passed in the insert query from Uipath to the SQL database using SQL profiler. Once we get that , we can try to execute it manually and troubleshoot. May be some unexpected syntax issue or values being passed.

Regards,
Sruthi YNM

1 Like