Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Simon Arnold
  Where is Simon Arnold?
 Halifax
 United Kingdom
 Simon Arnold
 To: Ernesto De Peralta
  Where is Ernesto De Peralta?
 Tuguegarao
 Philippines
 Ernesto De Peralta
 Tags
Subject: RE: Indexed record for deletion still showed in a file-client environment
Thread ID: 369 Message ID: 370 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Friday, May 25, 2001 6:33:34 AM         
   


> 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

ENTIRE THREAD