Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto generated primary keys
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Auto generated primary keys
Divers
Thread ID:
00538153
Message ID:
00538153
Vues:
43
I use auto generated primary interger keys for many tables in my application's database. The "new" functionality on the supporting bizobj maintenance forms seem to work quite well. However, I noticed that for each record added an iId value is skipped, which is a rather strange behavior, I thought worthy of investigation.

I'm using 6.1 to develope my app.

I found that the database's newid() stored procedure is called when the new command button is clicked and when the ov_table.save() does its tableupdate().

I compared my new records with those added in the 6.1 projmgr sample tables. I found that for those tables the newid() is called only on the new command button click and not when the tableupdate() is done, thus no ids are lost or wasted (unless the add is canceled).

I've compared my forms, views, data environments, and cursors properties with those of the sample app and I can't come up with any differences that would account for the strange behavior.

Does anyone have an idea what's going on? Most specifically, what causes the tableupdate() to call (or not call) newid() ?

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform