Visual Basic 6 ADO Update issue
I've been working with a Legacy application which interacts with a database through ADODB, and most of the changes to records follow a fairly straightforward pattern of:
- Create a Recordset from a query
- Make various change to the recordset
- call .Update on the recordset.
What I'm wondering is, with ADODB recordsets, is there anyway to extract the 'changes'. The logic which changes the recordset is scattered about, and all I need is the changes, not how it was change开发者_JAVA技巧d...
Any suggestions for tracking changes in a recordset (in code, a trigger on the DB or similar is no use here)
I personally have never used this functionality, but the documentation states you can set rs.Filter
property to adFilterPendingRecords
to show records that have been changed but not sent to the server yet (only applies to batch update mode).
Or, you could iterate through all records in a recordset, and if the .Status
property has the adRecModified
flag set, then you can compare .Value
and .UnderlyingValue
of each of the fields to see whether they are different.
精彩评论