SQL Query?(how to update the data tested in sql query in to the database entity?

Hi,

These are the data base entity values of Ediary entity.

I am giving this condition as Task 1 value="Task three"

I am testing this values and got the result.


 I have a question that in order to update the values in to the data base after testing the code is there any way( I have used the ;commit ; after the condition(it was showing error)) and (i have set the Expand Line in the query parameter to yes(but it was showing showing error)). after testing query also the values are not getting updated in to database. The table is as below.









Hello Swetha,


As I understood you need to update the database when you test the values.


for this we need to commit the transaction with some true condition.

Example(Query for deleting all records from Person entity) : DELETE from {Person} where 0=0commit

I hope this solves the purpose. Reply for any queries.


Thanks and Regards,

Changalrao B

Hi, I cannot get this query.

Hi,

DELETE from {Person} where 0=0commit  

Delete all the records from the Person entity and when you test at that time it should reflect in database so added a true condition and a commit.

Is this what you need to achieve?

Changalrao Bairaboyana wrote:

Hi,

DELETE from {Person} where 0=0commit  

Delete all the records from the Person entity and when you test at that time it should reflect in database so added a true condition and a commit.

Is this what you need to achieve?


Hi,

Beside deleting the entity values i need to update the tested query value in to the database.(All the data should be present in the database) when we give a condition depending on the condition the data should be fetched and displayed in the database. Is it possible?

Hi, in recent updates of OutSystems it is not allowed anymore to use the commit statement in the query test screen. 

You can create a button on your site for testing purposes and use a server action to manipulate the database instead of using the query test.