Support > Forums > OpenBots Studio > Bulk Insert

Bulk Insert

TI Distribucion

  • Reporter
  • Calender Icon January 10,2023 at 3:47 PM

Hello,

Hope all is doing well. I would like to know if there is a way to insert datatable in a bulk using Oracle Database connection.

Thanks

This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...

Cameron Herwig

  • Participant
  • Calender Icon January 13,2023 at 5:36 PM

Hi ti-distribucion,

You can use the Evaluate Snippet command to run isolated snippets of c# code. These can be mapped to existing variables in your Studio script, or you can create temp variables in the snippet itself.

In case you need to import a library which is not included as default, you can install the Nuget package dependency from package manager and import the needed libraries to your project from "Imports" tab:

Hope this helps!

TI Distribucion

  • Participant
  • Calender Icon January 13,2023 at 3:38 PM

Hello Nataly,

Thanks for your answer. I have a question, how can i employ c# libraries?

Nataly Alvarado...

  • Participant
  • Calender Icon January 11,2023 at 10:06 PM

Hi ti-distribucion,

I understand the case, because of the limitations SQL provides for simple queries, datatable is not supported as an input parameter type. For a case like the above described, we would need to setup a loop, and add the individual datarows or employ c# libraries (if possible).

However, I will take your suggestion to the product team to add a database bulk-add command and add it to our Studio backlog as a feature request.

Thanks!

TI Distribucion

  • Participant
  • Calender Icon January 10,2023 at 10:30 PM

Hello Nataly,

But for example, i have a datatable with 4000 rows. I want to insert 4000 lines in a bulk, not line by line. Is there a way to do that?

Thanks

Nataly Alvarado...

  • Participant
  • Calender Icon January 10,2023 at 10:14 PM

Hi ti-distribucion,

You can use the Execute Database Query command to perform an insert database query to your existing database connection. You can include multiple parameters in each query execution.

As an alternative, you can store operations in a stored procedure, and invoke it from the Execute Database Stored Procedure command.

Hope this helps!

You are not authorized to reply, please click here to login and add your reply to this topic.