Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buffering
Message
De
20/07/1998 12:40:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00119299
Message ID:
00119325
Vues:
23
>I'm getting an error message that says "function requires row or table buffering mode". In my form init and load I have the following code:
> SET MULTILOCKS ON
> =CURSORSETPROP("Buffering",3)
>It still writes the record though. How do I get rid of the error message?
>
>My next problem is that I'm trying not to write duplicate records. In the click event of my save button, I have the following code
> set order to tag lname
> seek upper(thisform.txtLname.Value + thisform.txtFname.Value)
> if !found()
> append blank
> endif
> =tableupdate()
>the lname index is on upper(lname + fname) What am I doing wrong?
>
>Thanks.

Jane

You don't have to play around in the Init routine unless you realy need to. You can open the database environment, click on each table on your form, and set the buffering property to what you need. Try that. It sound like you may have more than one table open and are only setting the property of one in your Init routine.

On your second question I use a brute force method. I open a second copy of the table called say LookUP. I set the order to tag lname in that file. In the valid method of the lname field I check LookUP for duplicates and warn the user. Then in the save Click() method I recheck it and stop the user and return to the form without saving.


I know I am speeking Harrisy here but you could use the txtbuttons, pictbuttons supplied by Microsoft in the wizstyle library. I found them usefull while learning because I didn't have to deal with reinventing the wheel while trying to drain the swamp. Later you can create your own button sets one button at a time or like me you can just modify the ones you were already using. I know I will get all kinds of flack for saying this (from the pureists) but it helped me.

Hope this helps

Terry
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform