Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clearing The Buffer
Message
De
19/11/1999 14:58:57
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00293090
Message ID:
00293254
Vues:
24
I'm with you on that part. I guess what i'm asking is how to show the appended record's ID in a text box on the form. When this form is used, I will be on the phone with my customers and will need to give them this number. I'm fairly new to foxpro programming and don't know if i can accomplish this with a simple statement or if I need to create some kind of modified form to pull from.


>Jimmy, if you use my "who cares" solution, it will show you the "buffered" PO number. You and users of your app have to understand that that PO number is not "real" until you save the PO. If you abort adding a new PO and then try to add another PO, you'll get yet another (next "virtual" PO number) to show up in your PO textbox.
>
>Look at it this way: even in the real world where you have sequence of pre-numbered invoice numbers on invoices that people create, sometimes you make a mistake on an invoice and discard it and print it on the next invoice. The invoice or PO number is only relevent and important if it's "actual".
>
>>OK, I'll buy into your logic of "who cares if it's not the very next number".
>>what would I use in the init event of a text box of the form to show the PO that's being used now?
>>
>>i.e. : this.value = ?????????????
>>
>>>This is the default behavior for "TasteTrade-like" way of incremental PK generator. The key field is updated at the time of new record insertion, even if the data is buffered and later aborted. The solution is to:
>>>1. Don't worry about the gaps between sequence of auto-incremented numbers. Why does this matter anyway?
>>>2. Don't use buffering directly on the table. Use some derivitive of SCATTER method and only update to actual table when saving.
>>>
>>>HTH
>>>
>>>>I have an incremental number generator (primary key) that I use for a P.O. number. I'm using Optimistic Buffering. The problem is that when I simply exit without saving and enter again, it increments again. The buffer doesn't clear until I close foxpro. what command can i use in the exit click event that will CLEAR THE BUFFER?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform