Hi Community,
I'm a newbie in Outsystems and just trying to insert the data using SQL query. My SQL query is working fine but I'm unable to insert the values in Database. I'm using "CreateDBAUser" action in SAVE button inside FORM and in the property section of this action I'm setting the values which I fetched from database
Can anyone notice where I'm doing wrong or suggest me any idea how can I correct that?
Please refer the image attached.
Hi Prince K,
Are you trying to insert this data into a table of your project or in a system table?
Is there really a need to do this create through advance query? Can't you make this insert with the existing CRUD actions of the Entity?
If you really need, create a CRUD server action with this insert inside, put the action in the same module where your Entity is created, and then call the action where you need it, with the respective parameters.
Best Regards,
Pedro C.
Hi Pedro,
Thanks for your response. Actually, I'm trying to performing CRUD operation by using SQL in project. So, I'm inserting the values into the Database entity by using SQL insert query.
So, I have created a server action (CreateDBAUser) where I'm using SQL widget and using insert query.
is there any issue while assigning the value to the parameter? Like I have done here in the properties section.
This server action I'm using onClick of button inside the screen. see the below image.
Hope you understand my point now. I just wanted to understand what is the issue here.
Thanks
Prince
Hi @Prince K
By this link your problem will be solved:-
https://www.outsystems.com/forums/discussion/37492/sql-insert-statement/
Thanks,
Vipin Yadav
Hello PRINCE,
In addition to vipin yadav answer,
You can refer below link for the same.
https://www.outsystems.com/forums/discussion/68040/how-to-insert-data-from-sql-into-dummy-table/
Oml files also available in the answer. You can take reference from it.
Hope it helps you.
Regards,
Ajit Kurane.