Error when inserting data into db

Hi, I am using the “Insert” activity to insert data from a data table in to a Maria db. The Maria syntax can sometimes be slightly different from “standard” MySql, but it should not really have any effect on a simple insert command. Still I get a error msg as shown below.

Does anyone have any experience with this a and possible know how to fix it?

(The workflow is built in Windows. UiPath and all activities are updated to latest versions)

Error msg:

23.8.0-beta.13817+Branch.release-v23.8.0.Sha.120cd3ec54f082511b48105e2cfb52f8897346a8

Source: Bulk insert

Message: ERROR [42000] [MySQL][ODBC 8.0(w) Driver][mysqld-5.5.5-10.3.38-MariaDB-cll-lve]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘DEFAULT VALUES’ at line 1

Exception Type: System.Data.Odbc.OdbcException

System.Data.Odbc.OdbcException: ERROR [42000] [MySQL][ODBC 8.0(w) Driver][mysqld-5.5.5-10.3.38-MariaDB-cll-lve]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘DEFAULT VALUES’ at line 1 at UiPath.Database.Activities.BulkInsert.HandleException(Exception ex, Boolean continueOnError)
at UiPath.Database.Activities.BulkInsert.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Database.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

type or paste code here

Hi

Can u share the statement you used to query data
@Evert_Randers

Hi,

I am using the “Bulk insert” activity so I am not writing any statements. Just selecting the data table and db table

And, if I am using the “Insert” activity I get the same error msg.

Hi @Evert_Randers ,

As a Test run could you check if you are able to perform the other Operations such as Retrieval using Select ? Or using the Insert Command Syntax with the Execute Non-Query activity and check whether it works or not ?

Also, Let us know if possible the Column Names used in the Datatable and also the column names in the Database Table.

1 Like