I have a excel with 10000 rows of data stored into a datatable I want to insert the datatable into table in MS ACCESS database file

Table name in MS access file has spaces which cannot be avoided because of this activity is failing. If i remove the spaces in table name in access database it works but i cannot do that because of requirement. Any suggestions.

I am using Insert/Bulk Insert activity

@sathwik.ramasahayam

Welcome to the community

Can you please show the bulk insert…so spaces in table name is creating issue?

Did you try givinf name between square brackets?

Cheers

This is the error message i get if i try to insert in square braces [copy Of Revenue for Revenue database]

Bulk insert: Syntax error in INSERT INTO statement.

Do you have any suggestions/solution for this issue

@sathwik.ramasahayam

Can you tell the error you get when you give the name directly…better tell error from inner exception in locals panel

cheers

Bulk insert: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).)

This is what i get

Seems like rather than trying to use UiPath to read the spreadsheet and then write to Access, you should use UI automation to navigate around in Access and load the data that way.

@sathwik.ramasahayam

This does not look like the error with name…can you show the inner exception please from locals panel

Cheers

Sure @Anil_G

RemoteException wrapping System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
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)

“Name”: “Bulk insert”,
“Id”: “1.11”,
“InstanceId”: “7”,
“TypeName”: “UiPath.Database.Activities.BulkInsert”

@sathwik.ramasahayam

Looks like the problem is because of the keywork database being in the table name…and not the spaces in the tablename

The solution for you would be to enclose in square brackets but if it is failing then we are left with only one option to use insert statement instead of bulk insert…this way you can write your statement and tablename can be included in square bracket and used

Or if you can instead of removing spaces try removing database keyword and check if it works and if you would be able to do that manipulation

Cheers

Thanks for you reply.

I tired removing database keyword still the same error