How to add a file(txt, pdf, etc) to a SQL database with Insert activity?

Hi everyone,

Did you guys manage to add a file from your desktop on an sql server via the “Insert” activity? If so, do you have a workflow example or please explain step by step how you did it?

Thanks in advance,

hi @CristianR88
You can use sql import export wizard for dumping excel file to table in sql db.
follow thw below steps,

  1. read the excel file and create output var is datatable
  2. Use for each row =>put var datatable => use execute query inside it.
  3. Use import arguements and assign row value variables to sql arguments=>Write insert query…
    hpy learning :grinning:
1 Like

Hi @shalinisettu,

Thanks for your answer, but I’m not sure you’ve fully read my request :slight_smile:

I want to add/upload an actual file from my desktop into the database. Not the content of the excel file, for example, but the file itself - i hope it makes sense

@CristianR88 ohh kk buddy fine , refer below thread which is solved by someone ,so jus go through it…
hope which may aid you… :blush:

I saw that already, but unfortunately I didn’t get it working and I cannot post there anymore as it’s being closed

@shalinisettu @judefelixantony If you could explain how to add the code in UiPath(or what to add) then it would be helpful