C
C#•11mo ago
Abdesol

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.
No description
11 Replies
Abdesol
AbdesolOP•11mo ago
this is the code 👆
Abdesol
AbdesolOP•11mo ago
The Id is also a primary key..
No description
Dev Master
Dev Master•11mo ago
Hi
Abdesol
AbdesolOP•11mo ago
Hi. Do you know the solution?
Dev Master
Dev Master•11mo ago
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.
Abdesol
AbdesolOP•11mo ago
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.
Dev Master
Dev Master•11mo ago
Please check DM
SG97
SG97•11mo ago
why would you use DM when they have an open issue where everyone can help?
Abdesol
AbdesolOP•11mo ago
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?
SG97
SG97•11mo ago
I think it's fine as is
Abdesol
AbdesolOP•11mo ago
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
Want results from more Discord servers?
Add your server