I am trying to bulk update from excel to mysql using uipath but i am facing this error. How can i resolve this. Mysql and odbc versions are latest updated

1 Like

@Ashish_Gajare

Please check the following

  1. Column names in the input datatable should exactly match with the column names in the sql database
  2. Try removing any special charqcters or spaces as that might cause an issue

Cheers

Yes I have checked it. The columns in MySQL database and the excel are exactly same and there are no null spaces or specials characters extra added anywhere

@Ashish_Gajare

Are the column types are matchign with the db?

Because as per error it shows the syntax is wrong near cust_name and may be you have some special characters or literals in your data…which might cause issue… say you data has a name like Ashish’s then it might be an issue.Please try with having one row with lcean data and then add more to check the syntax

Cheers

this error is coming not only for bulk update activity but it is also happening to insert activity when I am trying to insert table from excel to MySQL and also I have checked doing the same with other databases

@Ashish_Gajare

Please check the same

Also canyou try using normal insert query and check if the issue persists

Cheers

1 Like

Hi @Ashish_Gajare ,

Could you show us the Datatable column names ? You could use the below Expression in the Immediate Panel when performing a Debug and get the Column Names :

DT.Columns.Cast(Of DataColumn).Select(Function(x)x.ColumnName).ToArray

Screenshot_20230310_041913
Screenshot_20230310_042130

Hi @Ashish_Gajare ,

Since the columns are only a few, Maybe you could perform a check by Building a Datatable with the exact column names and also the exact types used in the SQL using a Build Datatable Activity. Populate some values to it and then check if the same error happens.

Also, Let us know which version of Database Activities is being used.

after creating data table using “build datatable” activity and trying to insert data or bulk update still I am getting same errors. I am thinking that there is something compatibility issues between my UiPath , odbc connector and MySQL but I have checked their versions . The versions are up to date and compatible with each other


Screenshot_20230310_051438

@Ashish_Gajare

Can you downgrade the database activities and check once…

Also if you use a insert query is it working?

cheers

Hi @Ashish_Gajare

This error message indicates that there is a syntax error in the SQL statement being executed by the UiPath process when trying to update data in the MySQL database. The specific error message indicates that the syntax error is near the “cust Name” field in the SQL statement.

To resolve this error, you should review the SQL statement being used to ensure that it is properly formatted and valid. Check for any typos or incorrect syntax, especially around the “cust Name” field, as this seems to be the source of the error.

You may also want to check the version of the MySQL server you are using and ensure that it is compatible with the version of the ODBC driver you are using. Incompatibilities between these components can sometimes cause errors like this one.