Android Question B4XTable Sql Update

mshafiee110

Active Member
Licensed User
Longtime User
I have a sample of B4XTable SQLite ,i need to select a row and then edit the row selected in another Activity .i use rowid column for sql query .but this not working correctly.
 

Attachments

  • B4XTABLE.zip
    341.3 KB · Views: 154

Mahares

Expert
Licensed User
Longtime User
.i use rowid column for sql query .but this not working correctly.
What is not working correctly. What do you get and what are you looking for, what error message if you get one. Give an example of what you are trying to do.
 
Last edited:
Upvote 0

mshafiee110

Active Member
Licensed User
Longtime User
Example is attached .... When you click on table row ,in edit activity you get wrong values...
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
When you click on table row ,in edit activity you get wrong values.
Why don't you be specific and give an example of a cell clicked, what it shows and what it is supposed to show in the EDIT. I did not see that it gave a wrong value, unless I am missing something. You are not going to get much help if you are not helping others pinpoint the problem.
 
Upvote 0

mshafiee110

Active Member
Licensed User
Longtime User

Please pay attention to this movie.in some record ,No value is sent to edit activity.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
n some record ,No value is sent to edit activity.
I made some changes to your project unrelated to the EDIT which worked for me from your example. I added a feature where it also saves the edit to the in memory database and the real database also. I also made the database initialization where it does not hang up and locks up like it does in your project. If you want to try it and see what it does for you, be my guest. I have an English keyboard not Arabic like your video shows. If you are still seeing the issue, then hopefully, someone else can help you, because the project I am attaching for you works well for me on my tablet. The EDIT works as it should.
 

Attachments

  • B4XTableSelectionsEditDeleteForForum053120.zip
    342.2 KB · Views: 159
Upvote 0

mshafiee110

Active Member
Licensed User
Longtime User
Tnx for your reply ,but this not working again.

 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Tnx for your reply ,but this not working again.
It looks like you are running it on an Emulator. Did you try it on a real device. You should. I wish someone who downloaded my project from my post #6 can report to us if it worked for them or if they had the same problem you did., because it worked for me just right.
 
Upvote 0

Xfood

Expert
Licensed User
Hello,
I downloaded the project, it works on my pc,
I only modified this line because it gave me an error in compilation


error:
Errore nella linea: 149
Dim l As List = SelectedLines.Values.Get(0)
Word: values

B4X:
' modul B4XTableSelections.bas
Public Sub FirstSelectedColumnId As String
    If SelectedLines.Size > 0 Then
        Dim l As List = SelectedLines.Get(0)  ' <----------------
        'Dim l As List = SelectedLines.Values.Get(0)   '  <------------- errore values not exist
        Return l.Get(0)
    Else
        Return ""
    End If
End Sub
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Errore nella linea: 149
Thanks for testing. What you referred to is in the class module, which I did not change anything there and I did not get the error you got. I mostly focused on the original OP problem which is the EDIT . @Xfood: t is possible that you got the error because you are using an older library of some sort that the class module uses..
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…