Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop Append blank
Message
 
 
À
20/11/2001 15:34:25
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00584174
Message ID:
00584182
Vues:
20
>>Hi everybody,
>>
>>I have a table with primary PK KeyID. This KeyID is auto-generated using default value in the field. Now, user opens table in command window and do append blank. GetNextID fails and returns 0. So, we ended with couple of records with 0 as PK.
>>
>>How can we stop APPEND BLANK if GetNextID fails?
>>
>>Thanks in advance.
>
>Why would GetNextID fail?
>
>Perhaps VFP can't find this function.
>
>I place the function which I believe is the equivalent into stored procedures. This works even if user issues APPEND BLANK from the command window, or adds a new record from the BROWSE window.
>
>HTH, Hilmar.

To be honest, it was my error in this stored procedure, which I just fixed. However, what if NextID table could not be opened or locked? In this case this function still would return 0 and we would end with 0 as Primary Key...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform