sql-net-pcl library, UpdateAll method is always returning 0, resulting in no update.
So in my project, after users make some changes to title and many other fields, I am trying to update already existing rows' cells with the updated data. But the
UpdateAll
method is not working in this case. It is always returning zero(which means no rows are updated) and infact, when I try to query what the db table is on, I see that they are still not updated. Is their any thing I am missing? I am starting and commiting the transaction and things look smooth over there. I appreciate any kind of help..
Thank you.11 Replies
this is the code 👆
The Id is also a primary key..
Hi
Hi. Do you know the solution?
Yes, I have solution
The "UpdateAll" method in the SQL-Net-PCL library is used to update multiple rows in a table based on a specified condition.
If the "UpdateAll" method is always returning 0, it means that no rows are being updated based on the specified condition.
Yeah. But I am sure some of the rows have updated cells when I provide the UpdateAll method.
Lately, while debugging, After UpdateAll method, I was trying to query the whole table.. and the updated table I provided and the query were very different. The query one has no the updated values.
Please check DM
why would you use DM when they have an open issue where everyone can help?
Please let's discuss here as it will help many ppl who will have this problem in the future.
Yeah. It is better for the solution to be here, for many ppl in the future
btw, after inserting a new card, updating that specific card works as long as I don't rerun the program or close and reopen the database connection.
@sn0wgirl_97 May I delete this thread and open a new one?
I think it's fine as is
The issue is fixed
It was an Id not being correct issue
I mean, upon running, when I map the table to my model, I also had to copy the ids together.. I didn't do that lately.. I did it now and it is working very well