How to delete a record in SQLite Database using DataGrid as Table?

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
shengton
Posts: 3
Joined: Sun Oct 13, 2019 3:21 pm

How to delete a record in SQLite Database using DataGrid as Table?

Post by shengton » Sat Jan 04, 2020 8:20 am

Hello guys,

I'm from the Philippines, very newbie. I try to create a sample app here, just for practicing. I already know how to Save data from the text field to SQLite Database. Now, I'm here at the portion of how to delete a record from the SQLite so that the record that has been deleted will be remove as well in the DataGrid. I don't know how to start the code.

What I want to happen is, I want to put a button inside the DataGrid so that every record has a delete button. My question are:
1. How can I put the button inside the DataGrid?
2. If I put the script in the button using the "DELETE" SQL statement, does it work?

If you have a sample script it would be helpful for me.

sphere
Posts: 1113
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: How to delete a record in SQLite Database using DataGrid as Table?

Post by sphere » Mon Jan 06, 2020 1:05 pm

you can find that info on how to add a button in the DG on lessons.livecode.com

Post Reply

Return to “Databases”