devxlogo

ADO Recordset

Question:
Is there a way to programmatically reset the status of a record in an ADO 2.1 recordset? For example, I would like to change the status of a record from adRecModified to adRecNotModified, but without reverting the field values to the original values.

Answer:
I don’t believe it’s possible, because a recordset stores three values for each field: Value, OriginalValue, and Underlying Value.

The Value is what you what you read and change. The OriginalValue is the value that was initially retrieved from the database. UnderlyingValue is what the recordset thinks is currently in the database. The Resync method (used with adResyncUnderlyingValues) refreshes the UnderlyingValue. However, I don’t know of a way of refreshing the OriginalValue without wiping out any changes.

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  How Engineering Leaders Spot Weak Proposals

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.