Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto generated primary keys
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Auto generated primary keys
Miscellaneous
Thread ID:
00538153
Message ID:
00538153
Views:
49
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
Next
Reply
Map
View

Click here to load this message in the networking platform