Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: R K Sarkar
  Where is R K Sarkar?
 Secunderabad
 India
 R K Sarkar
 Tags
Subject: RE: append programme
Thread ID: 143524 Message ID: 143527 # Views: 2 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Wednesday, August 29, 2007 3:23:29 PM         
   


> rksarkar
>
> Hi Experts!
>
> Help required for writting a code for append programme which will enable to avoid duplicate record and blank record.
>
> I have just started to learn visual foxpro. Can you help me to write a code for the above.....

RK,

It sounds as if you may not be using buffering. With buffering enabled, you have the opportunity to ask "do I want to keep this record or discard it?" With buffering, when your user creates a new record, that record is created only in the buffer (a temporary table.) You then give the user a "Save" button and if the user clicks that Save button, you issue a TABLEUPDATE(). This TABLEUPDATE() function takes that new record from the buffer and saves it in the original table. You also give the user a "revert" button. If the user clicks the revert button, you issue a TABLEREVERT(). As the name suggests, this function "reverts" the buffer to what it looked like prior to that record being added. In effect, TABLEREVERT() discards that new record.

If I might suggest, it may be helpful for you to read my article here:

https://www.foxite.com/articles/read.aspx?id=75&document=moving-from-single-user-to-multiuser-in-vfp

While you may not be interseted in creating a multi-user application, the principles discussed in that article apply to you. Note also that if you create your apps as multi user apps, they can still be used by single users. The reverse is not true - a single user app will not support multiple users.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

append programme Posted by R K Sarkar @ 8/29/2007 3:05:46 PM
RE: append programme Posted by Ken Murphy @ 8/29/2007 3:23:29 PM
RE: append programme Posted by R K Sarkar @ 8/30/2007 9:45:48 AM
RE: append programme Posted by Ken Murphy @ 8/30/2007 1:47:49 PM
RE: append programme Posted by Tamar Granor @ 8/30/2007 10:33:48 PM
RE: append programme Posted by Ken Murphy @ 8/30/2007 10:40:21 PM
RE: append programme Posted by R K Sarkar @ 8/31/2007 10:13:34 AM
RE: append programme Posted by Ken Murphy @ 8/31/2007 1:55:06 PM
RE: append programme Posted by Tamar Granor @ 9/5/2007 11:44:51 PM
RE: append programme Posted by Arjun Bagojikop @ 8/30/2007 1:30:02 PM
RE: append programme Posted by Ulhas Amrite @ 8/31/2007 8:19:39 AM
RE: append programme Posted by R K Sarkar @ 8/31/2007 10:18:35 AM