>Like to have some advise on the best way to handle table maintenance
>in a Network environment.
>1) Having the ControlSource assigned to each field, when doing a ADD
> with APPEND BLANK 'might??' cause problem if another user activated
> the same(ADD function) in a network.
>2) Is it good to use record buffering? Pessimistic or Optimistic?
>3) Is record locking handled automatically by VFP 3.0 when
> APPEND BLANK and REPLACE commands is issued.
> If so, when will it be released(unlocked record)?
>
>Pls advise (I'm quite confused on finding the best way to handle).
>Cheers
>
>______________________________________________________
>Get Your Private, Free Email at
http://www.hotmail.comI prefer (when adding a record) to use an entry form where all data fields are empty. When user 'accepts' or hits a 'save' button, I execute code to generate a primary key for the new record, put all the date fields into an array, then do a SQL - INSERT. This prevents problem of primary key violations, blank records, still allows other users to be editing current records during the 'add record' process, etc. VFP handles the automatic locking then unlocks the table header.
Insert into MyTable from array MyArray
I also prefer optimistic row buffering and do a tableupdate() or tablerevert() on that row only depending on how the user 'exited' that row or form. I avoid table locking as much as possible because this prevents other users from editing individual records at the same time.
Mark McCasland
Midlothian, TX USA