Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>I have an old app written many years ago for single user use. No buffering, no cursors. Just open a table and edit it. I now need to set it up for multi user use. There is one parent table and a half dozen or so child tables some of which are opened more than once with different aliases.
>>
>>Q1- Do I need to buffer ALL the tables?
>>
>>Q2- What type of buffering would be best? record level or table level, optimistic or pessimistic?
>>
>>Q3- Where is the best place to put the tableupdate? lostfocus, form.destroy, on shutdown, etc. I would like to avoid isediting mode and leave it "hot" all the time.
>>
>>Thanks, please excuse my ignorance.
>
>Well, to answer your questions in short:
>
>1. Yes, I would use optimistic table buffering for all tables which are used for editting information.
>
>2. Optimistic table buffering is what I use.
>
>3. Do you have Save method in your form? This is the place for tableupdate. I also check if Data were changed in Form's QueryUnload method and then ask user a question do they want to save or not or cancel.
I do not have a SAVE function in my form. I have trained my users that when they make an edit, its a done deal, so be careful. (I know, not very elegant but I was a beginner when I wrote it.) If I read the HELP correctly, if I use optimistic record locks (buffer mode 3) VFP will automatically update the table whenever the record pointer is moved without an explicit call to tableupdate. If that's true it would seem a good way to go. Then I would only have to worry about a form close and maybe do a SKIP in the form.destroy. Any thoughts?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement