Information générale
Catégorie:
The Mere Mortals Framework
Titre:
Auto generated primary keys
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement