Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key with one to many Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00530359
Message ID:
00530378
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
Hi Leroy,

You can easily generate a key programmatically by creating a table containing two columns, say "key description" and "key value", populating that table with a row for each key you wish to generate; then, writing a method/proc to seek that table for the desired key description, increment the related key value, and return that key value to the calling program for use in the creation of a new row.

Most commercial frameworks have some sort of code that does this, but it's not a major project to create this on your own. Obviously, you can get pretty fancy with this if you need to (base 36/62 values, encryption, data type translation, and so on) but in its simplest form, the basic approach still serves the purpose well.

>Hello Everyone!!!
>I have a form that I made with the wizard. It is a one to many form. In the parent portion of the form I have a Primary Key of Paid_id ( it is of number type) and in the child portion of the form, it is a grid that is linked by paid_id.
>I want to be able to generate a Primary Key that I can use keep my tables in line.
>Question:
>Should I not use the wizard and write the form from scratch?
>Should I modify the Form that the wizard made?
>And finally, Is there a way for me to generate a Primay key programmaticly or does anyone know of a download that does this?
>
>Thanks in advance
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform