I am just wondering whether I could use update_recordset to update a value for a single record. Microsoft has used update_recordset where there are lot of records needs to be updated. But is there any downsides we will be having if we use the same for a single record updation? Is there any reason for us to user the update method in this scenario?
Also, I wanna understand whether update_Recordset will process anything different when compared to normal update method since it as well hits the table's update method unless the table methods is been forced to not to be called.
When you run update_recordset, you update all records meeting a condition. There may be multiple records, but it may be just a single one or none at all. Therefore yes, it can be used for a single record.
If update() method is overriden, it'll be called by update_recordset (unless suppressed), as you correctly mentioned. But that means that you're losing performance benefits of update_recorset, because it needs to fetch records from DB and call the method on each of them, instead of simply sending an UPDATE command to database.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.