web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delete Datas of SQL
Power Apps
Unanswered

Delete Datas of SQL

(0) ShareShare
ReportReport
Posted on by

Good morning,

 

How can i erase a data of SQL DataBase?

 

 

Capturar.PNG
Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey! If you want to remove all the data from the table, please refer to the screenshot and use the formula : 

     

    RemoveIf('[dbo].[employees]',true)

    here 'employees' is my table name. MicrosoftTeams-image.png

     

    Thanks, 

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at

    In reality i want to delete only the line selected in the database 

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey!

    Please refer to the screenshot below for the command to delete the selected item.MicrosoftTeams-image (4).png

     

    Hope this helps!

    Thanks,

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Community Power Platform Member Profile Picture
    on at

    I have this error.

     

     

    Capturar.PNG
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi, I am unable to see the error in this one. Can you please share a screenshot clearly indiacting the error. 

     

    Kindly ensure that the SQL table has a primary key defined. 

     

     

    Thanks, 

  • Community Power Platform Member Profile Picture
    on at

    Follow the error

    Capturar.PNG
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi, 

     

    I do not understand the language. It would be really helpful if you could post the error in English. 

     

    However, I see a few errors in the expression. 

     

    In the Remove command, you have used a semicolon between the function and the input parameter so please make that as a comma. 

     

    After the remove part you have put two semicolons please remove one. I see that within the OnSelect command in the advanced editor, you have put semiclon in the IsEmpty function too. Please make necessary changes and ensure that the semi colons and commas are properly placed. 

     

    Hope this helped. 

     

    Thanks. 

  • Community Power Platform Member Profile Picture
    on at

    The error says something like "The data source is read-only so it is not possible to write the remove function on it".

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Okay. Can you please check the SQL data table and confirm that it has atleast one primary key. This error usually pops up when the data table does not have a primary key. 

     

     

    Thanks. 

  • v-xida-msft Profile Picture
    on at

    Hi @Anonymous ,

    Have you defined a proper PRIMARY KEY within your SQL Table?

    Further, have you made your SQL Table as Read-Only within your SQL Database?

     

    I do not find any syntax error with the formula you typed in your app. Based on the error message "The data source is read only, ..." that you provided, it seems to tell that you have set your SQL Table as Read-Only within your SQL Database.

    Please check if you have set your SQL Table as Read-Only within your SQL Database. If true, please consider remove this limit from your SQL Database.

    Please check and see if the following blog would help in your scenario:

    https://www.techcartnow.com/change-database-from-read-only-to-read-write-mode-in-sql-server/

    https://stackoverflow.com/questions/2529839/how-to-make-a-table-read-only-in-sql-server

     

    Also please check if you have defined a proper PRIMARY KEY within your SQL Table. If you want to remove records from a SQL Table within your app using Remove() function, the PRIMARY KEY is required in your SQL Table.

    Please check the following SQL Server connector limits for more details:

    https://docs.microsoft.com/en-us/connectors/sql/#known-issues-and-limitations

     

    If the issue still exists, please consider re-create a new SQL Table along with a proper PRIMARY KEY in your SQL database, then re-create a new connection to this new Table from your app, try your Remove function again, check if the issue is solved.

    Note: Do not make your SQL Database as Read-Only.

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 408

#2
WarrenBelz Profile Picture

WarrenBelz 382 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 328 Super User 2025 Season 2

Last 30 days Overall leaderboard