Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: RECORDSET.filter adFilterConflictingRecords


Message #1 by "Phillip Johnson" <phillip.johnson@e...> on Thu, 22 Nov 2001 09:53:31
At the risk of promoting a non-wrox book on the wrox site, I'll quote from 
a truly EXCELLENT book: "Serious ADO: universal access with visual basic", 
apress, Rob macDonald, ISBN 1-893115019-4 p250:

"adFilterConflictingRecords.  This filter is generally misreported as 
identifying only those records that failed the last rs.UpdateBatch.  It so 
happens that it only identifies those records that failed the last 
rs.UpdateBatch due to an optimistic locking conflict.  it doesn't include 
records that failed for other reasons. "

So duplicate records or other key/integrity violations will not show up 
with this filter.

I **think** I'd try adFilterPending records, and then examining the status 
field for each, looking for adRecIntegrityViolation, or 
adRecSchemaViolation (remember the status is a bitmask).


> I am running the RECORDSET.updateBatch and I am getting an error saying 
> that the records cannot be processed as there are duplicate values, so I 
> execute "RECORDSET.filter adFilterConflictingRecords" to try and filter 
> the recordset to only contain the conflicting records.  The problem is 
> that after the filter, the recordset doesnt contain any records.
> 
> Any ideas or suggestions on this would be very welcome!
> 
> Thanks in advance,
> 
> Phillip

  Return to Index