Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Trusha Savsani 15 posts 94 karma points
    Apr 20, 2017 @ 11:13
    Trusha Savsani
    0

    Insert data to the table of SQL database from Umbraco Form

    As I am new to Umbraco, I am little bit confuse that ,

    Is it possible to insert data into SQL Table from the Umbraco Form?

    I searched a lot but didn't get any solution. Please give me your suggestions or some reference links for the same.

    Please note that I already have connection string in web.config for my SQL database.

  • Tim Watts 90 posts 395 karma points
    Apr 21, 2017 @ 11:08
    Tim Watts
    101

    Hi Trusha,

    There is nothing available out of the box. I've not done it myself, but you could create a custom workflow, see Adding a Workflow Type

    If you don't fancy trying that you could base your solution on one of the existing workflows but it won't be as smooth, for example Save as Xml. Then write something which picks up the Xml and writes that to your database in the required format.

    Alternatively, the Umbraco form data is already held within the Umbraco database and depending on what you want to do with it you may just be able to read the data directly.

    Tim

  • Trusha Savsani 15 posts 94 karma points
    Apr 21, 2017 @ 12:25
    Trusha Savsani
    0

    Hi Tim,

    Thanks for your reply. Is there any alternate way to create form and insert/Update data into SQL database instead of Umbraco form?

    Trusha

  • Tim Watts 90 posts 395 karma points
    Apr 22, 2017 @ 12:31
    Tim Watts
    0

    Hi,

    You can use any view to add an HTML form and process the data however you want in the controller.

    There's a blog post here which might help explain some of the steps.

    Regards,

    Tim

Please Sign in or register to post replies

Write your reply to:

Draft