Android Question How to use DBUtils.DeleteRecord(Starter.SQL1,"Students", !?)

Theera

Expert
Licensed User
Longtime User
In The first activity,I have success for map data as code belows

and another activity,I use webview to show database
WebView1.LoadHtml(DBUtils.ExecuteHtml(Starter.SQL1,"SELECT [Id],[First Name] || ' ' || [Last Name] As Name From "Students",Null,0,True))

Now,I need to delete the record from WebView1 after I click and get the row ,I can't set the map in the command and update webview
DBUtils.DeleteRecord(Starter.SQL1,"Students", !?)

I'm sorry my English.
 

Theera

Expert
Licensed User
Longtime User
It should be:

B4X:
DBUtils.DeleteRecord(Starter.SQL1, "Students", CreateMap("Id":HereTheIdYouSeleted))
It 's correct only the first time's deletion ,and then I need to delete the record again ,the row is not equal to ID. How do I get ID from the row which is selected?
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Ok My problrem is solved myself. Thank you for kind of you,LucaMs
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…