Detecting deleted records

Detecting deleted records

Post by Robert Chafe » Sun, 01 Sep 2002 00:06:54



What is the correct way to detect that a record has been deleted? If I
set a recordsets Bookmark property, and the record has just been
deleted then I get a 'record deleted' error when I try to access the
data - fair enough - but how do I tell? None of the properties I
looked at seemed to give any ideas.

Robert Chafer
Silverfrost Limited.   http://www.silverfrost.com
Home to Solar Kingdom, the 3D Solar System Simulator

 
 
 

Detecting deleted records

Post by Val Mazu » Sun, 01 Sep 2002 00:14:42


Hi,

Recordset has Filter property. If you set it to adFilterAffectedRecords,
then you could see records affected by last Delete, Resync, UpdateBatch, or
CancelBatch call. See if it is what you need

--
Val Mazur
Microsoft MVP


Quote:

> What is the correct way to detect that a record has been deleted? If I
> set a recordsets Bookmark property, and the record has just been
> deleted then I get a 'record deleted' error when I try to access the
> data - fair enough - but how do I tell? None of the properties I
> looked at seemed to give any ideas.

> Robert Chafer
> Silverfrost Limited.   http://www.silverfrost.com
> Home to Solar Kingdom, the 3D Solar System Simulator


 
 
 

Detecting deleted records

Post by Robert Chafe » Sun, 01 Sep 2002 02:17:47


The records are being deleted by another process (my app but another
user, or me with multiple copies open to test), so I don't delete
them, they just disappear. I assumed that the recordset would have a
property that would tell me. I have got around it by immediately
referencing the first field - checking for the error code and handling
it. I don;t really like that style - much rather test a flag.

Robert Chafer
Silverfrost Limited.   http://www.silverfrost.com
Home to Solar Kingdom, the 3D Solar System Simulator

 
 
 

Detecting deleted records

Post by Val Mazu » Tue, 03 Sep 2002 10:28:22


Hi,

I do not think that record would keep suck kind of information if it was
deleted by another user

--
Val Mazur
Microsoft MVP


Quote:

> The records are being deleted by another process (my app but another
> user, or me with multiple copies open to test), so I don't delete
> them, they just disappear. I assumed that the recordset would have a
> property that would tell me. I have got around it by immediately
> referencing the first field - checking for the error code and handling
> it. I don;t really like that style - much rather test a flag.

> Robert Chafer
> Silverfrost Limited.   http://www.silverfrost.com
> Home to Solar Kingdom, the 3D Solar System Simulator