Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary key
Message
 
 
À
22/01/2001 12:35:50
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00466733
Message ID:
00466742
Vues:
8
>How come does my Primary Key does not trap the error UPON LEAVING the field itself? Shouldn't it trap the error regardless the =TablUpdate(), correct?
>
>Does the Primary supposed to catch the error RIGHT AWAY upon leaving the field, for ANY REASONS?

What error? Duplicated key? Is this in a view? Buffered table? If you are using a view, you should not populate the PK field. You should have a default value for your PK field in the table itself. My default value, for example, calls a stored procedure in the DBC. This default value is GetPrimaryKey('MyTableName'). The SP opens my Kounters table if not already open, locates the record that matches the table name I passed to the SP. I then lock that record, increment the kount, unlock the record, return the value.

BTW, if there is no record in the Kounters table that matches the table name passed to the SP, I add a new record to the Kounters table.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform