Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling Identities
Message
 
To
15/03/2010 21:14:50
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01454212
Message ID:
01454747
Views:
34
Frank,

I realized after sending my last reply that your field was never mentioned as the PK. I use identity columns exclusively for PK's so I made that assumption. My bad!

Anyway, the framework (or BLG) does nothing special with identity columns other than exclude them from the stored procedures for inserting and updating rows for the data layer since the database will take care of creating its value.

As far as the AutoIncrement stuff is concerned, I have not used that so I can't any insight into how it's used. But you could still use the identity column for this but I would use this only if there is no need to change this value. If you still feel you need to change this (and I will add again that I don't know why you would want to do this) then you could create your own number generating process similar to what MM for VFP did. MM for VFP had a 'NewID' procedure that stored the last value used for a given table in an 'ID' table and then used that value for the new record after incrementing it.

Bob



>Bob,
>
>the Identity field is not my primary key. I have a Guid as that. Anyhow, forget about the identity field, I was just using it to see how the MM.NET framework works. I am just feeling my way with this framework and trying to work out how to do things I would normally do with VFP.
>
>Do you know how to get the framework's AutoIncrementCustom stuff to work on a column that is not the PK? Or another technique to generate a number that helps in identifying records of people (just in case they have the same name I like to have a customer number as well as the name)?
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform