Re: Indicating Deleted Records
From: DNagel (NOTGrandNagel_at_hotmail.com)
Date: 08/03/04
- Next message: Jeff Johnson [MVP: VB]: "Re: Calling a VB .NET DLL from VC++ .NET"
- Previous message: Cash: "Calling a VB .NET DLL from VC++ .NET"
- In reply to: ChrisM: "Indicating Deleted Records"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 03 Aug 2004 09:05:57 -0700
ChrisM wrote:
> Hi,
>
> I have a VB6 form with a ADO Data Control on it.
>
> On the form is a set of textboxes which are databound to fields in the Data.
>
> There is also a Delete button which calls the Delete method on the
> DataControls Recordset.
> Due to the properties of the recordset, deleted records are only marked as
> such until the .UpdateBatch method is called (this is what I want to
> happen).
>
> My question is, as the records still appear to be there until the
> BatchUpdate is called, is there a way of telling/indicating to the user that
> the record is pending deletion?
>
> TIA,
>
> ChrisM.
>
Heres some comments from
http://17.webmasters.com/caspdoc/html/ado_recordset_object_delete_method.htm
according to this The Filter method should permit you to show or hide
the deleted records...
D.
Delete Method Remarks
Using the Delete method marks the current record or a group of records
in a Recordset object for deletion. If the Recordset object doesn't
allow record deletion, an error occurs. If you are in immediate update
mode, deletions occur in the database immediately. Otherwise, the
records are marked for deletion from the cache and the actual deletion
happens when you call the ADO Recordset Object UpdateBatch Method. (Use
the Filter property to view the deleted records.)
Retrieving field values from the deleted record generates an error.
After deleting the current record, the deleted record remains current
until you move to a different record. Once you move away from the
deleted record, it is no longer accessible.
If you nest deletions in a transaction, you can recover deleted records
with the RollbackTrans method. If you are in batch update mode, you can
cancel a pending deletion or group of pending deletions with the ADO
Recordset Object CancelBatch Method.
If the attempt to delete records fails because of a conflict with the
underlying data (for example, a record has already been deleted by
another user), the provider returns warnings to the ADO Errors
Collection, but does not halt program execution. A run-time error occurs
only if there are conflicts on all the requested records.
- Next message: Jeff Johnson [MVP: VB]: "Re: Calling a VB .NET DLL from VC++ .NET"
- Previous message: Cash: "Calling a VB .NET DLL from VC++ .NET"
- In reply to: ChrisM: "Indicating Deleted Records"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|