Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Dale Dedoroy
  Where is Dale Dedoroy?
 Bacolod City, Negros Occidental
 Philippines
 Dale Dedoroy
 To: Ryss Unger
  Where is Ryss Unger?
 Cape Town
 South Africa
 Ryss Unger
 Tags
Subject: RE: Indexed record for deletion still showed in a file-client environment
Thread ID: 369 Message ID: 399 # Views: 3 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Sunday, May 27, 2001 9:53:42 PM         
   


> > > i have this problem:
> > >
> > > my friend and i were network together to perform a quiz and the problem given to us by our professor is to make use of a multi-user environment. All the components for adding a record, moving to the top,bottom,next & previous record were working but our main problem is the deleting of record.
> > >
> > > In my program's form, everytime i delete a record that record would not show in my screen but in the other screen (my friend) it still exist.
> > > I have used SET DELETED ON which would index the temporary deleted data so therefore although it would not show in the screen it would still be present in the table, but contrary to the effect it still exist in my friend's screen wherein he networked his computer to mine and is using my program.
> > >
> > > the adding of data worked because everytime i entered a new record, my friend would automatically see what i have inputted and vice-versa
> > >
> > > this is my code:
> > > set deleted on
> > >
> > > if !eof()
> > > if messagebox("Delete this Record? ",292,"deleted")=6
> > > delete
> > > skip
> > > else
> > > go bottom
> > > endif
> > > endif
> > >
> > > i have set the following properties:
> > > buffermode for the dataenvironment is set to 5-optimistic table buffer
> > > buffermode for the form is set to 2-optimistic
> > > datasession is set to 2-private session
> > >
> > > Thank you very much and hoping for your help
> > >
> > >
> > >
> > >
> >
> > After the Deletion of the record you will need to issue a TableUpdate, as this will make sure that the refresh of the data from the private session is passed to the underling data.
> >
> > For More info see: TABLEUPDATE and TABLEREVERT in the VFP help.
> > Hope this Helps.
> >
> > Simon Arnold
> > Westlake Computer Systems Ltd.
> > Halifax, UK.
> > simon.arnold@foxite.com
>
> Hi
> Set deleted ON Specifies that commands which operate on records (including records in related tables) using a scope ignore records marked for deletion.
>
> Some criptic comments therefore:-
> option 1:- data source is ... for deleted() <> .t.
> your co user will not see the record
>
> option 2:-if you show a delete tag , like in a grid, it should show when co user moves onto that record
>
> option 3:-If your delete operation , whicih is really a " mark record for deletion at a later time" includes
> replace name with "Deleted"+"name" no mistakes or confusion.
>
> option 4:- as above but just make record a blank record.
> append procedure will be :-
> search for blank and if found use , else appand blank
>
>
> Note:
> Hope this helps. The refreshing of changes on the network is very good in vfp but in my experience the user must move onto the record to show the change. It will not happen automatically.
>
> Hope some help here and we geyt some more comments from other users.
>
> Regards
> Ryss

Consult the help about SET REFRESH command.

Dale

ENTIRE THREAD