Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No Append
Message
De
17/08/2009 02:37:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01418404
Message ID:
01418407
Vues:
59
>Is there a way i can open a file and allow changes but disallow append.
>
>something like this
>select 1
>use myfile1 index name (noappend)
>sele 2
>use myfile2 index name2 (noappend)
>
>i am aware that the noappend works with browse
>but is there code that can be used when iniatilly opening a file that will have the same affect as noappend
>(and allow changes to existing records)
>
Hi Karen -

You can perhaps use an Insert Trigger that returns either .T. or .F. depending on your condition.
On the other hand, I wonder what your conditions are - wouldn't it be as easy as displaying thedesired alias(es) inside Grid(s) with .AllowAddNew=.F. (default and then disabling a "cmdNew" button if any?

(As for your code: better do something like
Use yourTable Shared In 0
rather than using hard-coded workareas by doing a Select 1,2,3 beforehand.
And if you are using standard compound CDX index files (recommended), you do not need the Index clause.)


hth
-Stefan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform