Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generate Primary Key
Message
De
03/12/2003 12:27:17
 
 
À
02/12/2003 23:16:02
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00855292
Message ID:
00855500
Vues:
13
>Hi,
>I would like to use primary key as document no. like invoice no, po no. and etc. Could you please give me some ideas what customization should be done kbizobj, dataenvironment and ccursor? Should I have two dataenvironment/ccursor in one kbizobj? Any advises?
>
>I want the PK to be fetched on any new record, but NOT increase the value. It should only increase the value during save.

I don't see any need to change the business object/de/cursor classes to support this, but it might be that I don't understand what you're trying to accomplish. If you wanted to print the "PO Number" primary key on a report, you would bind the field to the primary key value, and do the same to display it on a form.

A primary key is incremented when the new record is created, and generally doesn't change after that. If you're trying to guarantee an uninterupted sequence even if changes are discarded, using the primary key won't give it to you. If you're adding PO#6 and a co-worker adds PO#7, what's supposed to happen if you cancel your PO?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform